I'm using it on the update. When I used it on the Select, it did the update to all the rows. Dixon
On Fri, Dec 12, 2014 at 3:35 PM, 'Martijn Tonies (Upscene Productions)' [email protected] [firebird-support] <[email protected]> wrote: > > > > Hello Dixon, > > Is this using the ROWS on your UPDATE or on your SELECT? > > With regards, > > Martijn Tonies > Upscene Productions > http://www.upscene.com > > Download Database Workbench for Oracle, MS SQL Server, Sybase SQL > Anywhere, MySQL, InterBase, NexusDB and Firebird! > > > *From:* mailto:[email protected] > <[email protected]> > *Sent:* Friday, December 12, 2014 9:31 PM > *To:* [email protected] > *Subject:* Re: [firebird-support] How do you write dynamic sql in Firebird > > > > Martijn, > > > > Thanks, ROWS worked perfect > > > > I changed it to this and am getting what I want. > > > > UPDATE tblCampaign a SET > a.BATCHNUM = :BatchNum > WHERE a.CAMPAIGNID IN (SELECT c.CAMPAIGNID > FROM tblCampaign c > WHERE c.CAMPAIGNNAME = :CampaignName > AND c.CONTACTPERMISSION = 'Y' > AND c.ABORTCAMPAIGN = 'N' > AND c.BATCHNUM = -1 )ROWS :Cnt; > > > > Dixon > > > -- Dixon Epperson
