Forum Replies Created

Viewing 15 posts - 1 through 15 (of 21 total)

  • RE: Updating Comma Delimited Field

    I am looking for a Table Valued function to do this functionality, pass comma delimited field, and than it will treturn me an updated one so I can use that...

  • RE: Updating Comma Delimited Field

    I am wondering Can we make any table valued function to do this ?

    where I can make it generic and which can be used with any other table

    hi...

  • RE: Updating Comma Delimited Field

    Cadavre (5/22/2012)


    I agree with the previous statements made, you are going to have many difficulties.

    However, your current design can be used if it absolutely has to.

    SELECT MRN, additional_procedure, additional_procedure_Location,

    STUFF((SELECT ','+

    ...

  • RE: Updating Comma Delimited Field

    Hi guys, It was our need to keep data in comma delimited field, how ever

    I wrote following query to get those back in comma delimited field, I have done...

  • RE: Updating multiple values from 1 table to another

    Currently all fields in Temptable 2 are Null.

    Output of Temptable 2 would be after an update statement would be as follows

    Address = Newton Australia

    Phone = 111111

    idnumber = NULL

    OfficeNumber...

  • RE: Create a new record based on groups

    Thank you for your reply, I solved the probelm,

    1. conditional spilit

    2. Used OLEDB command to update bundled

    3. Used aggregate to group records, use max and min functions to...

  • RE: Create a new record based on groups

    I still have problem in implementing 2, can you elaborate it in more detail. Stil lI am confused how I am going to create a single record from the...

  • RE: resarting row number based on values in categories

    Solved the probelm, thank you so much for the guidance you have provided I really learned alot, never used CTE and Outer Apply before

    once again thanks

    Drop table #table

    Drop table #table_with_groupid

    --...

  • RE: resarting row number based on values in categories

    Thanks for your quick reply; I have done exactly what you are saying that I have added columns, also trying to learn as much as possible.

    I really appreciate your...

  • RE: resarting row number based on values in categories

    Drop table #table

    Drop table #table_with_groupid

    -- Prepare test data

    CREATE TABLE #table

    ([Admissions_key] bigint NOT NULL PRIMARY KEY,

    MRN nvarchar(10) NOT NULL,

    hosp_code nvarchar(10) NOT NULL,

    adm_datetime datetime NOT NULL,

    sep_datetime datetime NOT NULL,

    Sequence nvarchar(10) NOT NULL

    )

    SET...

  • RE: resarting row number based on values in categories

    SELECT t.*, g.IsGroupCorrect

    FROM #table_with_groupid t

    LEFT JOIN

    (-- Find which group is correct and which is not

    SELECT tg.GroupID,

    IsGroupCorrect = CASE -- correct is group that have 'First' and...

  • RE: resarting row number based on values in categories

    use this code please

    Drop table #table

    Drop table #table_with_groupid

    -- Prepare test data

    CREATE TABLE #table

    ([Admissions_key] bigint NOT NULL PRIMARY KEY,

    MRN nvarchar(10) NOT NULL,

    hosp_code nvarchar(10) NOT NULL,

    adm_datetime datetime NOT NULL,

    sep_datetime datetime NOT NULL,

    Sequence...

  • RE: resarting row number based on values in categories

    Drop table #table

    Drop table #table_with_groupid

    -- Prepare test data

    CREATE TABLE #table

    ([Admissions_key] bigint NOT NULL PRIMARY KEY,

    MRN nvarchar(10) NOT NULL,

    hosp_code nvarchar(10) NOT NULL,

    adm_datetime datetime NOT NULL,

    sep_datetime datetime NOT NULL,

    Sequence nvarchar(10) NOT NULL

    )

    SET...

  • RE: resarting row number based on values in categories

    I just read my post, want to further clarify that from those correct records I would create a single new record and in that single new record I would be...

  • RE: resarting row number based on values in categories

    First, I am really very sorry for inconvenience for not properly explaining problem one at a time and not providing proper data.

    Thanks a lot, It is really a great...

Viewing 15 posts - 1 through 15 (of 21 total)