Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Slow DELETEs on a table

    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...

  • RE: Cast to VarChar Without Knowing the Length

    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

  • RE: Cast to VarChar Without Knowing the Length

    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...

  • RE: Cast to VarChar Without Knowing the Length

    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...

  • RE: Cast to VarChar Without Knowing the Length

    Sergiy (11/2/2007)


    The task sounds like text processing.

    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...

  • RE: Cast to VarChar Without Knowing the Length

    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,...

  • RE: Cast to VarChar Without Knowing the Length

    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...

Viewing 7 posts - 1 through 7 (of 7 total)