Prev Previous Post   Next Post Next
  #1  
Old 12th September 2006, 01:26 AM
Hans Hasenack
 
Posts: n/a
Default Returning an empty dataset

I just needed the column list of the resulting query for a field picklist,
so I surrounded the original query AABB by

SELECT * FROM
(AABB) T
WHERE FALSE

But unfortunately this fails if the original query AABB was segmented...
(multiple SQL statements like creating an index and then returning data
using a select statement)

So I decided to change all the SELECT keywords into SELECT TOP 0 and then
returning the query result.

But hey, this is strange: I get ALL records back? SELECT TOP 1 returns one
record, SELECTR TOP 2 returns two records, but SELECT TOP 0 returns all
records?

Bug or WAD?

Regards - hans




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning result sets using a stored procedure Grant Brown nexusdb.public.support.sql 3 29th August 2006 04:28 PM
Deliberately return an EMPTY ResultSet from a Query Dennis Landi nexusdb.public.support.sql 6 31st January 2006 07:19 AM
Result Fields are empty Bernhard Roos nexusdb.public.support.sql 6 3rd December 2005 04:31 AM
2.04 preview not returning data Thomas Lohrum nexusdb.public.support.sql 1 20th October 2005 01:06 PM
Query not returning the correct dataset. Rodrigo Gómez [NDX] nexusdb.public.support.sql 4 21st July 2005 02:19 AM


All times are GMT +11. The time now is 04:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.