Try ...

DECLARE @MRID int
SET @MRID = (SELECT MIN(ID) AS MRID FROM HomePageReleases)

DELETE HomePageReleases
WHERE ID = @MRID


-----Original Message-----
From: S R [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 5:02 PM
To: CF-Talk
Subject: SQL help


I'm trying to get this sql statement to work within sql server in one shot 
and it seems to be ignoring the DELETE statement completely because when I 
do a select * from HomePageReleases, nothing is deleted. Do you see anything

wrong?

SELECT MIN(ID) AS MRID FROM HomePageReleases

declare @MRID int
select @MRID = @MRID

DELETE HomePageReleases
WHERE ID = @MRID

Thanks for your help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to