Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select all the colums although some empty/null

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • 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...
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
it is sybase.
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sybase it is: A.c1 *= B.c2
Oracle A.c1 (+)= B.c2
regards...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic