Subject | Re: [firebird-support] Command to duplicate a record in a table |
---|---|
Author | Yohanes Ongky Setiadji |
Post date | 2009-08-27T09:58:18Z |
I decided to use Stored Procedure so when I use develop application for the front end, I don't need to rewrite the procedure on the program
but simply call the Stored Procedure in the database using EXECUTE PROCEDURE and pass the parameter to update the data.
Regards,
Ongky
From: Mentek
Sent: Thursday, August 27, 2009 2:26 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Command to duplicate a record in a table
Regards, Bogdan
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.67/2326 - Release Date: 08/26/09
12:16:00
[Non-text portions of this message have been removed]
but simply call the Stored Procedure in the database using EXECUTE PROCEDURE and pass the parameter to update the data.
Regards,
Ongky
From: Mentek
Sent: Thursday, August 27, 2009 2:26 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Command to duplicate a record in a table
>> Anyway I have tried to use:DETAIL a WHERE a.HID = "A" AND a.DID = :vDID;
>>
>> FOR SELECT a.DID
>> FROM DETAIL a
>> WHERE a.HID = "A"
>> INTO :vDID
>> DO
>> INSERT INTO DETAIL (HID, DID, TOTAL) SELECT "C", a.DID, a.TOTAL FROM
>>Why not ?
>> and it worked.
>>
>> But I am open for any suggestion.
> May I suggest you to read something about SQL?..
> What prevent you from using simple "INSERT INTO DETAIL (HID, DID,
>TOTAL) SELECT "C", a.DID, a.TOTAL FROM DETAIL a WHERE a.HID = "A""? Why
>you decided to use Stored Procedure at all?
> SY, SD.
Regards, Bogdan
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.67/2326 - Release Date: 08/26/09
12:16:00
[Non-text portions of this message have been removed]