Subject Re: [firebird-support] How do you write dynamic sql in Firebird
Author Martijn Tonies (Upscene Productions)
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!
 
 
Sent: Friday, December 12, 2014 9:31 PM
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