SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Script Table Data For Selected Columns

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Script Table Data For Selected Columns
Author Message
isken.r



Joined: 16 Mar 2012
Posts: 16
Country: Australia

Post Script Table Data For Selected Columns Reply with quote
Hi guys,

Just a quick question. Is there a way to Script Table Data with Sql Assistant v.6.4 for selected columns? Currently, if we script the data it will automatically script all columns including the PK column. Is there a way to easily exclude the PK column or any other column from being scripted if needed?

Thanks
Mon Oct 07, 2013 7:01 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Consider creating a view and including only the required columns.

What do you need the scripted data for? This can help me to suggest other possible solutions.
Mon Oct 07, 2013 8:27 pm View user's profile Send private message
isken.r



Joined: 16 Mar 2012
Posts: 16
Country: Australia

Post Reply with quote
Thanks for your reply. I guess it's more of a convenience thing.

Use case 1: on some occasions, when we want to export the data we don't really care about the PK values, in which case we either have to manually remove the PK columns from the auto-generated script OR set the IDENTITY INSERT to ON and the turn it OFF again.

User case 2: sometimes we just need to extract certain columns. As you said there's a workaround of creating a view then generating a data script off it and remove it afterwards.

I just thought maybe I'm missing something because it seemed quite obvious to me that there should be an option for the users to be able to select the exact columns they want to extract from a table. It could be just me and not an obvious thing for others. But then again maybe others can back me up here and vote for this useful feature in future releases?

Thanks
Mon Oct 07, 2013 8:45 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
If the purpose of the data export is to import the data somewhere else, I recommend using XML based Export/Import function. You could many different things using that function, for example, you can choose a subset of columns, or choose how to import the data (append,, replace, etc...) or choose different source and target tables, remap source and target columns, etc... Moreover, you can save the export definition as a project file, and then reuse it latter if you need to rerun the entire thing.

As for the scripting and column selection, for me personally that is not an obvious option, I rarely script single tables. When I need to export the entire schema, with several dozens and sometimes hundreds of tables, I don't want to go through table and especially column selection process, but again, it depends on a situation, and personal preferences.
Mon Oct 07, 2013 9:08 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.