Forum Replies Created

Viewing 15 posts - 50,956 through 50,970 (of 59,078 total)

  • RE: BCP Trigger Hangs up Insert Statement

    Another problem other than the ones already stated is that even if all of this worked correctly, BCP destroys existing files and overwrites them.

    I may have a work-around for this,...

  • RE: DELETE DUPLICATE RECORDS

    Ariel Dimapilis (4/23/2008)


    Hi All

    Anyone can help me how to delete a duplication records retain one value in one table

    Can anyone give a script for deleting duplicates records.

    Please help me, I'm...

  • RE: Working with strings

    What is the primary key of the matrix? Also, not that we'll necessarily need it, but can Dynamic SQL be used?

  • RE: querying a string

    GSquared (4/25/2008)


    That's going to work better than spaces around the "like" statement. Of course, if you want it to include "pros" (plural), or "professional"/"professionals", you can add to the...

  • RE: querying a string

    MarkusB (4/25/2008)


    In order to work correctly, you must surround the source and target with the delimiters in the column... in this case, spaces.

    [font="Courier New"]SELECT myvarcharCol from mytable

    WHERE ' '+myvarcharCol+' '...

  • RE: Get rid of Dynamic SQL

    I use this one often...

    [font="Courier New"]...

    ...

    WHERE (@A = AColumn OR @A IS NULL)

    AND (@B = BColumn OR @b-2 IS NULL)

    AND...

  • RE: Extracting Rows from Delimited Strings

    Try this... it's Adrian's original code with some conditions added...

    SELECT LEFT(raw_payload, CHARINDEX('+', raw_payload, 1)-1),

    ...

  • RE: Extracting Rows from Delimited Strings

    Gus,

    This is an SQL Server 2000 forum... 😉

  • RE: Extracting Rows from Delimited Strings

    Adrian... take a look at the original post... the first entry in the data looks like 'S2009+' which means that you'll get invalid substring messages for the 2 and 3rd...

  • RE: Merging Rows with comma

    karthikeyan (4/25/2008)


    I am also thought to use WHILE LOOP.

    Adrian, do you think is there any performance wise difference between using CURSOR and WHILE loop ?

    Please share your thoughts.

    Cursor (with...

  • RE: Merging Rows with comma

    karthikeyan (4/25/2008)


    Adrian,

    You are correct. But i don't have the permission to create functions. Can you provide some other alternate ways ?

    You could either ask for the privs or get the...

  • RE: querying a string

    MarkusB (4/25/2008)


    The most simple option would be using LIKE

    SELECT myvarcharCol from mytable

    WHERE myvarcharCol LIKE '%project%'

    Another option would be using the PATINDEX function

    SELECT myvarcharCol from mytable

    WHERE PATINDEX('project',myvarcharCol) > 0

    Try either of...

  • RE: T-sql update name fields

    Gary,

    The spaces you're getting is probably because of the data or datatype... For example, are you using CHAR or VARCHAR in the existing table? Are there trailing spaces in...

  • RE: While Loop Vs Cursor

    rbarryyoung (4/24/2008)


    I've been out on a job. Sorry for throwing this out there and running, but I hoped it could get you started...

    Jeff Moden (4/24/2008)


    Barry, would you explain why...

  • RE: Converting Hexadecimal String Values to Alpha (ASCII) Strings

    I agree that there're a lot of things, like this conversion, that should be done in the GUI instead of SQL Server. Displaying commas in dollar amounts and formatting...

Viewing 15 posts - 50,956 through 50,970 (of 59,078 total)