Forum Replies Created

Viewing 15 posts - 3,976 through 3,990 (of 5,504 total)

  • RE: Extract Monthly report but Different DATE Format data into SQL server 2005 Database

    The easiest way would be to change your columns from varchar into datetime format. You could add another column each with datetime format and copy the varchar values into the...

  • RE: Splitting A String

    Paul White (3/16/2010)


    ...

    Yikes. XML is not the right tool for the job when it comes to string splitting.

    The tally-table method presented by Lutz, Bob, and Jeff is far,...

  • RE: Splitting A String

    Something like this?

    DECLARE @OutlineNumber VARCHAR(1000)

    SET @OutlineNumber= '.I.A.1.b.'

    SELECT STUFF(SUBSTRING(@OutlineNumber,1,CHARINDEX('.',@OutlineNumber,N+1)),1,1,'')

    FROM dbo.Tally

    WHERE N < LEN(@OutlineNumber)

    AND SUBSTRING(@OutlineNumber,N,1) = '.'

    The variable needs to have a dot...

  • RE: Counting # of Duplicate Records

    No need for further discussion.

    Seems like the question has already been answered here .

    Side note: since the solution in the other thread is based on ROW_NUMBER I guess the...

  • RE: Counting # of Duplicate Records

    redrabbit9999 (3/15/2010)


    This works!!! Thanks. I have another question:

    Do you know how to pivot transform the data so that it looks like this:

    Unpivoted Data:

    Column1 Column2 Column3

    A ...

  • RE: Importing XML Files Into SQL Server

    Glad I could help 😀

    And sorry for underestimating the performance improvement 😉

  • RE: Question on pivot tables

    Hi

    thanks for your informations but ALL TIMES I GET

    Msg 170, Level 15, State 1, Line 7

    Line 7: Incorrect syntax near 'PIVOT'.

    Message Dou you have any suggestion for me

    Duplicate post.

    Please...

  • RE: PIVOT function

    muratistanbul (3/14/2010)


    Hi, When I use PIVOT function , ALL THE TIMES I GET

    Msg 170, Level 15, State 1, Line 7

    Line 7: Incorrect syntax near 'PIVOT'.

    Message is anybody have suggestion for...

  • RE: Are the posted questions getting worse?

    RBarryYoung (3/14/2010)


    Well, my back surgery is tomorrow (it got moved up). They've been putting me through medication withdrawal the last two weeks in preparation, so apologies if I've been...

  • RE: building a date

    I'd expect the problem is within the setting of your DATEFORMAT parameter.

    But the major problem is: you're trying to treat a date value as a string.

    If it's a date, use...

  • RE: Transposing repeating sets of rows into colums

    Ok, here's what I came up with. I'm not sure if it'll help but it might be at least something to start with.

    CREATE TABLE #temp

    (id INT IDENTITY(1,1),

    col VARCHAR(60) ...

  • RE: Are the posted questions getting worse?

    To any of you folks from "down under":

    Congrats for winning the Hockey World Championship in India!

    We didn't have that much of a chance in the final though...

  • RE: Are the posted questions getting worse?

    @paul-2: CONGRATULATION to be one of the top 25!

  • RE: Importing XML Files Into SQL Server

    The reason for the bad performance is you're 'climbing up' one level each time you select one of the values from the Circuit node. Try to use CROSS APPLY instead.

    I'd...

  • RE: Stored Procedure Problem Help!

    scott.atkins (3/13/2010)


    Hi Sorry for the late reply, thanks for the information much apreciated,

    Im just curious how would you write a CURSOR script though? Would some one be able to...

Viewing 15 posts - 3,976 through 3,990 (of 5,504 total)