Viewing 15 posts - 35,551 through 35,565 (of 49,557 total)
oliver.morris (12/2/2009)
OK I think I have tracke it down to refering to a table variable column as @tbl.column1why is it not possible to do this
Just the way the language works....
December 2, 2009 at 5:41 am
rahulsony111 (12/1/2009)
How can i specify the table name and column name.
Like this. As I said, look at the rest of the query where it is done properly
BEGIN
select 'alter table '...
December 2, 2009 at 12:15 am
Might be worth calling Microsoft's customer support on this
December 2, 2009 at 12:15 am
December 2, 2009 at 12:13 am
Sherri Barkley (12/1/2009)
December 2, 2009 at 12:10 am
Few things. You're going to get a syntax error from that saying that the name column is ambiguous. You need to specify the table and column name in the piece...
December 1, 2009 at 2:11 pm
This should work on SQL 2000
select 'alter table ' + sysusers.name + '.' + tables.name
+ ' alter column ' + columns.name +
case columns.xtype
...
December 1, 2009 at 1:31 pm
homebrew01 (12/1/2009)
December 1, 2009 at 1:04 pm
rahulsony111 (12/1/2009)
i should use a stored procedure cause it will be used very often
Why would you be doing data type changes very often?
December 1, 2009 at 1:02 pm
Matt Miller (#4) (12/1/2009)
Considering we're looking at a dev edition error log, this is possibly someone shutting the machine down (which could be a workstation and not a server).
If SQL...
December 1, 2009 at 12:54 pm
Jeff Moden (12/1/2009)
Heh... clever startup procedure trick by a laid off employee???
Not unless there's a WAITFOR DELAY 2 hours before the SHUTDOWN. Possible though, evil thing to do. Wouldn't the...
December 1, 2009 at 12:51 pm
homebrew01 (12/1/2009)
December 1, 2009 at 12:48 pm
Dynamic SQL. No other practical way. Watch out for SQL injection....
Question I have is why a stored procedure? Are you expecting data type changes to happen so often that you...
December 1, 2009 at 12:44 pm
No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic826906-8-1.aspx
December 1, 2009 at 12:42 pm
Viewing 15 posts - 35,551 through 35,565 (of 49,557 total)