Viewing 7 posts - 1 through 7 (of 7 total)
I will second the copy/drop/rename solution.
Or, in my case, drop/rename/create as I was doing a SELECT INTO of 750K
rows every few minutes from an intermediate table. It was quicker to...
November 4, 2007 at 7:47 pm
Uh oh... Jeff Moden was my hero for a bit with his QUOTENAME suggestion.
How fickle are the fleeting fortunes of fame - consider this:
[font="Courier New"]DECLARE @s-2 VarChar(4000)
SET
November 3, 2007 at 11:52 am
Ronald San Juan (11/3/2007)
cast(fieldname as varchar) will do.
It won't. Cast doesn't do anything special to set the size of varchar and varchar defaults
to a length of 30.
Empirical testing shows that...
November 3, 2007 at 7:45 am
Sergiy, my apologies for not being clear. The data is completely in SQL Server.
When I say I don't know what the data is in advance, it is because I don't...
November 3, 2007 at 12:55 am
Sergiy (11/2/2007)
I don't see anything related to databases in it.
I believe T-SQL has nothing to do with it.
There are many other, more effective tools for...
November 3, 2007 at 12:22 am
Interesting idea. Are there any types QUOTENAME can't handle?
I hadn't even given it a thought because the T-SQL ref says:
QUOTENAME ( 'character_string' [ , 'quote_character' ] )
However,...
November 3, 2007 at 12:07 am
Sorry, when I said fields I meant columns.
It is a table where I need to convert every column value to varchar. I don't have anyway of knowing
the number of columns...
November 2, 2007 at 11:19 pm
Viewing 7 posts - 1 through 7 (of 7 total)