• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

select all the colums although some empty/null

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i would like to select some columns from different tables, but from within 15 of these , sometimes 7 of them might be empty.
But I would like to set these 'null' values with either empty or null. How can I achieve these?
my select statement at the moment just returns all the rows that satisfy all the criteria.
so I loose some of the data which I must somehow get...
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you need to do what's known as an "outer join".
Since the SQL syntax for outer join's vary per Database provider, can you post back which DB you are using? (Oracle, DB2, SQL Server etc)
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is sybase.
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sybase it is: A.c1 *= B.c2
Oracle A.c1 (+)= B.c2
regards...
reply
    Bookmark Topic Watch Topic
  • New Topic