Subject Re: [firebird-support] How do you write dynamic sql in Firebird
Author E. D. Epperson Jr
I'm using it on the update.  When I used it on the Select, it did the update to all the rows.

On Fri, Dec 12, 2014 at 3:35 PM, 'Martijn Tonies (Upscene Productions)' m.tonies@... [firebird-support] <> wrote:

Hello Dixon,
Is this using the ROWS on your UPDATE or on your SELECT?
With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Sent: Friday, December 12, 2014 9:31 PM
Subject: Re: [firebird-support] How do you write dynamic sql in Firebird



Thanks, ROWS worked perfect


I changed it to this and am getting what I want.


    UPDATE tblCampaign a SET
    a.BATCHNUM = :BatchNum
                            FROM tblCampaign c
                                WHERE c.CAMPAIGNNAME = :CampaignName
                                AND c.CONTACTPERMISSION = 'Y'
                       AND c.ABORTCAMPAIGN = 'N'
                                AND c.BATCHNUM = -1  )ROWS :Cnt;



Dixon Epperson