aspose file tools*
The moose likes JDBC and the fly likes select all the colums although some empty/null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "select all the colums although some empty/null" Watch "select all the colums although some empty/null" New topic
Author

select all the colums although some empty/null

Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
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

Joined: Jun 26, 2001
Posts: 403
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

Joined: Nov 15, 2001
Posts: 132
it is sybase.
Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
Sybase it is: A.c1 *= B.c2
Oracle A.c1 (+)= B.c2
regards...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: select all the colums although some empty/null