Subject | Re: [ib-support] How can I check if a table is empty? |
---|---|
Author | Ikka Vertika (DTC) |
Post date | 2003-05-07T03:33:39Z |
How about :
"IBTable.IsEmpty"
Can we use that function to check if a table is empty ?
--> IBTable : TIBTable (from IBX Palete)
Thank you,
Ikka Vertika
jakarta - indonesia
"IBTable.IsEmpty"
Can we use that function to check if a table is empty ?
--> IBTable : TIBTable (from IBX Palete)
Thank you,
Ikka Vertika
jakarta - indonesia
----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <ib-support@yahoogroups.com>
Sent: Wednesday, May 07, 2003 09:18 AM
Subject: Re: Spam Alert: Re: [ib-support] How can I check if a table is empty?
| >How would you use that in Delphi with IBX?
|
| It's a PSQL construct so - by calling a stored procedure that uses it.
|
| You can do the EXISTS() test in DSQL inside a WHERE clause, e.g.
| SELECT.....
|
| WHERE EXISTS(SELECT 1 FROM MyTable)
|
| So to test whether MyTable is empty you could just create a bare DSQL
| select statement that returns something, e.g
| select '1' from rdb$database where exists(select 1 from MyTable)
|
| heLen
|