Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip read-only columns #27

Open
gatuser opened this issue Sep 15, 2014 · 3 comments
Open

Skip read-only columns #27

gatuser opened this issue Sep 15, 2014 · 3 comments

Comments

@gatuser
Copy link

gatuser commented Sep 15, 2014

It would be nice if when you say Select * from a table, it would not include read-only columns. E.g., timestamp, identity, computed columns. Thanks.

@nycdotnet
Copy link
Owner

Interesting idea. I'll think about the best way to do this.

@nycdotnet
Copy link
Owner

@gatuser I'm intending to include an options dialog in the next release. Among the options will be a dropdown for how to handle read-only fields.

For ROWVERSION/TIMESTAMP:

"In SQL Server, you can't insert an explicit value in a ROWVERSION or TIMESTAMP field"
'Script for INSERT' will script these fields as either BINARY(8) or VARBINARY(8) so the INSERTs will work.
'Script for schema' will keeps the field as ROWVERSION or TIMESTAMP, but the scripted INSERTs will not run.
'Skip them' will simply exclude TIMESTAMP or ROWVERSION fields from the output.

There will be two checkboxes to enable scripting of Identity and Computed fields. By default they will be "on".

@gatuser
Copy link
Author

gatuser commented Oct 9, 2014

Sounds good…

Just as an FYI, I would use this tool mainly to script out existing tables/data in order to be able to create the table and insert data into another database. Usually for small and mainly static tables that would be used to support an application I would be developing. For that reason, the table I am inserting into would be the same as was scripted using your tool and I would never be wanting to insert into any read-only columns.

From: Steve Ognibene [mailto:notifications@github.com]
Sent: Wednesday, October 08, 2014 8:28 PM
To: nycdotnet/TSqlFlex
Cc: gatuser
Subject: Re: [TSqlFlex] Skip read-only columns (#27)

@gatuser https://github.com/gatuser I'm intending to include an options dialog in the next release. Among the options will be a dropdown for how to handle read-only fields.

For ROWVERSION/TIMESTAMP:

"In SQL Server, you can't insert an explicit value in a ROWVERSION or TIMESTAMP field"
'Script for INSERT' will script these fields as either BINARY(8) or VARBINARY(8) so the INSERTs will work.
'Script for schema' will keeps the field as ROWVERSION or TIMESTAMP, but the scripted INSERTs will not run.
'Skip them' will simply exclude TIMESTAMP or ROWVERSION fields from the output.

There will be two checkboxes to enable scripting of Identity and Computed fields. By default they will be "on".


Reply to this email directly or view it on GitHub #27 (comment) .Image removed by sender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants