If your running a SELECT statement you can include COUNT(*) as an extra
column. If you are running another SQL statement which does not return a
recordset (INSERT, DELETE, UPDATE) you can check the @@ROWCOUNT something
like:
IF @@ROWCOUNT = 0
<YOUR SECOND QUERY>
Cheers,
Bill
In a message dated 8/13/01 12:51:21 PM Eastern Daylight Time,
[EMAIL PROTECTED] writes:
> Hello, i'm running a stored proc that contains two queries. if the first
> query runs and does not return records, i need to run the second query. Can
> anyone tell me the equivilent of recordCount in Transact-SQL? Thanks.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists