Forum Replies Created

Viewing 15 posts - 256 through 270 (of 761 total)

  • RE: update table

    Have you tried something like this??

    Update a Set a.Value = b.Value From @temp2 As a

    JOIN @temp1 As b ON a.Member = b.Member

  • RE: Pipe delimited row in tsql

    Thank you very much Dwain. I got to understand almost all of it. But the only thing I don't understand is that I can get the results using the following...

  • RE: Pipe delimited row in tsql

    drew.allen (6/19/2012)


    vinu512 (6/19/2012)


    Can you post a link where there is a good explanation on the STUFF Function, the way it is being used here??

    The BOL entry for STUFF (Transact-SQL) gives...

  • RE: Old and new in same column

    Olalekan Adewale (6/19/2012)


    Thanks all..

    Cadavre , vinu512 ,dwain.c, Ravi Kumar-191606

    .. you all are wonderful .. God bless.

    You'r Welcome 🙂

  • RE: Select Number before "/"

    dwain.c (6/19/2012)


    There's also a PATINDEX solution to this.

    DECLARE @t TABLE (mystring VARCHAR(100))

    INSERT INTO @t

    SELECT '100034/com.ccs.ccscontact'

    UNION ALL SELECT '1003/com.ccs.ccscontact'

    UNION ALL SELECT '100/com.ccs.ccscontact'

    UNION ALL SELECT '20005/com.ccs.ccscontact'

    SELECT SUBSTRING(mystring, 1, PATINDEX('%[^0-9]%', mystring)-1)

    FROM @t

    Just guessing...

  • RE: Old and new in same column

    dwain.c (6/19/2012)


    Easy, peasy!

    [/code]

    Lol Dwain.....:-D:-D:-D

  • RE: Select a chain

    erics44 (6/19/2012)


    🙂

    very helpful thanks

    i assume you dont understand?

    Wow!!!....You're smart. That was a simple question to understand the Logic.

  • RE: Select Number before "/"

    You can use ParseName as follows as well:

    Select PARSENAME(REPLACE(Column1, '/', '.'), 4) From TableName

  • RE: Select a chain

    erics44 (6/19/2012)


    Hi

    I have a table with 2 ids in it

    here is an example

    ID FromID

    1 0

    2 1

    3 0

    4 ...

  • RE: Row_Number doubt

    IgorMi (6/19/2012)


    Hi,

    If I were you, I would create the new table with identity key + the same structure of the table you're migrating.

    Regards

    IgorMi

    +1.

    Only creating an Identity Column in the new...

  • RE: Conversion failed when converting varchar to int

    440692 I am just a number (6/19/2012)


    ramadesai108

    Depending on how you generate the values for the @EmpID, it may be worth looking at declaring it as a table and populating it...

  • RE: Pipe delimited row in tsql

    dwain.c (6/19/2012)


    vinu512 (6/19/2012)

    Hi Dwain,

    Can you post a link where there is a good explanation on the STUFF Function, the way it is being used here??

    I see it all the time,...

  • RE: Old and new in same column

    It could be done as follows:

    ;With CTE

    As

    (Select a.emp_code, a.old_emp_code, a.emp_name, b.emp_amount,

    ROW_NUMBER() Over (Partition By a.emp_code Order by (Select NULL) ) As rn

    From @team As a

    Left JOIN...

  • RE: Conversion failed when converting varchar to int

    What is the DataType of @EmpId?? Is it Varchar??

  • RE: Pipe delimited row in tsql

    dwain.c (6/18/2012)


    Jeff Moden (6/18/2012)


    krishusavalia (6/18/2012)


    Thanks , That's what I was looking for.

    Great. The next questions would be 1) Do you actually understand how it works so you can support...

Viewing 15 posts - 256 through 270 (of 761 total)