Subject | Re: [firebird-support] Insert SQL ??? |
---|---|
Author | Uwe Grauer |
Post date | 2004-03-06T14:57:22Z |
Hi Gerry,
yust a view hints:
ggroper wrote:
insert into existingtable (col1, col2, ...) values (select (col1, col2,
...) from view)
trigger for this.)
Refer to LANGREF.PDF and DATADEF.PDF:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_documentation
Uwe
yust a view hints:
ggroper wrote:
> I am new to Firebird and need a little clue as to the proper syntaxNo, specify fieldnames in insert and select like you need it:
> for a stored procedure.
>
> I'm inserting data into and existing empty table from a view.
>
> The view and the table structures are the same, field names, field
> characteristic (as seen by Developers Workbench), and field order.
>
> insert into existingtable select * from view
>
> First question, does the insert ignore field names and just uses field
> order and expect the field types to OK?
>
insert into existingtable (col1, col2, ...) values (select (col1, col2,
...) from view)
> Second, do I need some begin trans ... commit trans statements aroundYes, its always better to use exclusive transactions.
> the insert statements???.
>
> Is there any way to insert new records(primary key) and ignoreYou could use Generators for this. (You have to write a before insert
> duplicate records or do I need to revise a view to illiminate those
> duplicates??
>
trigger for this.)
Refer to LANGREF.PDF and DATADEF.PDF:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_documentation
> thanks,Hope this helps for a starting point.
>
> gerry
Uwe