Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show blank row when there's no result in query

Status
Not open for further replies.

dynamicjourney2001

Programmer
May 15, 2003
30
0
0
US

Hi,

I want to display a blank row when my query returns 0 result. i have accomplished this using a UNION clause,

Select col1 from table where col1 = 1
Union select '' where not exists (select col1 from table
where col1 = 1)

but Im curious on how it could be handled w/o using a union.

Thanks in advance guys.


Have fun!
 
Is your task just to print blank row? I mean that probably someone may provide solution for your REAL TASK rather than for METHOD chosen by you to fulfill it. Maybe you may use pl/sql and check sql%rowcount.

Regards, Dima
 
Hi, thanks for the reply.
I figure-out how to accomplish it without using a UNION keyword. And yes it was on my task, actually Im using the query for my Powerbuilder datawindow object.
I used the inline view method in accomplishing it.
Thanks again.

Have fun!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top