The following query
in MSSQL it will produce the following results (which i will display as comma separated values) when there are no records
0,NULL,NULL
if there are records then only the real records are displayed.
I know that someone has to ask why.
Short answer: To trick the asp.net GridView control into displaying the footer (which I use to add new records).
My problem is that I have to use Oracle on a new project and Oracle returns nothing when I execute a similar query.
Does anyone have any idea how to get the same results in Oracle?
Thank-you, in advance for your time and effort.
SQL:
SELECT column1, column2, column3 FROM [table1]
UNION ALL SELECT '0',NULL,NULL FROM [table1] HAVING COUNT(*)=0
in MSSQL it will produce the following results (which i will display as comma separated values) when there are no records
0,NULL,NULL
if there are records then only the real records are displayed.
I know that someone has to ask why.
Short answer: To trick the asp.net GridView control into displaying the footer (which I use to add new records).
My problem is that I have to use Oracle on a new project and Oracle returns nothing when I execute a similar query.
Does anyone have any idea how to get the same results in Oracle?
Thank-you, in advance for your time and effort.