Forum Replies Created

Viewing 15 posts - 181 through 195 (of 203 total)

  • RE: T-SQL

    Goldie Graber (11/17/2009)


    Lynn Pettis (11/17/2009)


    I GOT it!

    The query should have been written like this instead of as four separate queries:

    SELECT

    DATEADD(day, -1, GETDATE()),DATENAME (dw ,DATEADD(day, -1, GETDATE())...

  • RE: T-SQL

    Dietmar Weickert (11/17/2009)


    I cannot remember a worse QOD than this one.

    This is true, this question seems to do the trick of becoming a clear leader in this category. In SQL...

  • RE: Stored procedure parameters

    Aaron N. Cutshall (8/10/2009)


    I've been burnt by this "feature" too often to not recognize it! It took me hours to track down an issue cause by a string truncation...

  • RE: Generating Insert Statements

    sathesg (8/4/2009)


    The script is very good, but how to convert the data again to english ?

    You don't have to. It is already stored in correct format. Selecting inserted records from...

  • RE: column & data type.

    The good news is that though the answer could be it depends, answering the question was not difficult given existing choices. The question asked whether it is possible or not,...

  • RE: column & data type.

    Lynn Pettis (7/23/2009)


    There really should have been a third choice: It Depends. It really does, what data type is being converted to what data type?

    Exactly. It also depends on...

  • RE: Generating Insert Statements

    a_k93 (7/3/2009)


    Hi there,

    Thnx for your reply. I tried your work around but it seems to be not working, may be I am making some mistake, but let me tell you...

  • RE: Generating Insert Statements

    noelpv (7/2/2009)


    Or you can set column width:

    Tools \ Options \ Query results \ SQL Server \ Results to Text \ Maximumnumber of characters displayed in each column

    Yes, this is exactly...

  • RE: Generating Insert Statements

    a_k93 (7/2/2009)


    Hi there,

    Nice article, I have one question. When I change your sample code from...

    and ran the statement it raised an error

    Operand type clash: varbinary is incompatible with...

  • RE: Generating Insert Statements

    imran.raza (7/2/2009)


    I have found more better way to do this as mention below

    set quoted_identifier off

    declare @sql1 nvarchar(1000)

    set @sql1="select 'insert county (county_fips, state_fips) values(''' + county_fips + ''',''' + state_fips...

  • RE: Generating Insert Statements

    wilkimatt (7/2/2009)


    Scripting in binary format is a great idea, however the script is failing for some reason with this table:

    .....................

    The result is this:

    insert into dbo.ecspuraccount ([id], [reference], [name], [address_1], [address_2],...

  • RE: Generating Insert Statements

    Tony Webster (7/1/2009)


    Also, not that it probably matters too much in practice, but that function call has a bit of a performance hit - that's what makes it take about...

  • RE: Generating Insert Statements

    TSycamore (7/1/2009)


    Oleg,

    Interesting...

    What I am getting when I run your example of handling a text data type is:

    insert into dbo.test ([col1], [col2]) values (0x00000001, 0x73616d706c6520312c73616d706c652031);

    insert into dbo.test ([col1], [col2]) values (0x00000002,...

  • RE: Generating Insert Statements

    TSycamore (7/1/2009)


    Very good article. This technique could be very useful to me right now.

    I tried it on a relatively small, simple table and it worked fine. However, on a larger...

  • RE: Generating Insert Statements

    Chris Howarth (7/1/2009)


    Another new feature of SQL Server 2008 is an extension to the CONVERT function whereby a binary value can be converted to a string representation.

    e.g.

    SELECT CONVERT(VARCHAR(MAX), 0x484920544845524521,...

Viewing 15 posts - 181 through 195 (of 203 total)