Start a new topic

Creating insert statements for data in a table?

[This topic is migrated from our old forums. The original author name has been removed]

Isn't it possible to create insert statements for some data in a table?
I thought that selecting the data and right clicking with the mouse and selecting "Script: Insert into table" would do this, but it just creates a strange sql....


Regards,

BTJ

[This reply is migrated from our old forums.]

Re: Creating insert statements for data in a table?
BTJ, You need to disable General->Table Data->Include Variables in SQL in Tool Properties. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Creating insert statements for data in a table?
Well, if I do that I only get one "empty" insert statement, like this:

insert into plm (id,
terminal_id,
config_line,
description,
plm_type,
plm_name) values (
,
,
'',
'',
'',
'')


I have marked 50 rows, shouldn't I get 50 insert statements with data?


BTJ
[This reply is migrated from our old forums. The original author name has been removed]

Re: Creating insert statements for data in a table?

You can create insert statements for a data grid by choosing export. In the wizard that shows up you can choose for the SQL option. This will export your grid into a fill containing the insert statements.

Benny

[This reply is migrated from our old forums. The original author name has been removed]

Re: Creating insert statements for data in a table?
Yes, I know...

But what is the feature I am talking about used for?
(and if this feature should work as I think, then it is much faster than using Export..)

BTJ
[This reply is migrated from our old forums.]

Re: Creating insert statements for data in a table?
BTJ, The Script: features are used to create templates in the SQL Commander that you then need to edit/fill with actual data. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Creating insert statements for data in a table?
Hmmm..... That explains it...

But shouldn't there be a feature like the one I am talking about? It would make life a bit easier... :)


BTJ
[This reply is migrated from our old forums.]

Re: Creating insert statements for data in a table?
BTJ, I will add your request to make "Script: INSERT COPY INTO TABLE" multi row aware and the result will then be one INSERT per selected row. Thanks! Regards Roger