Forum Replies Created

Viewing 15 posts - 16 through 30 (of 117 total)

  • RE: How to convert this XML into columns

    Sean Lange (5/2/2012)


    That can't possibly be the entire code for your proc. It is selecting data from temp tables that are not declared inside the proc.

    Let's go from this code:

    ALTER...

  • RE: How to convert this XML into columns

    R.P.Rozema (4/27/2012)


    Something like this?

    with cteRates as (

    select o.emp_id,

    row_number() over (partition by o.emp_id...

  • RE: How to convert this XML into columns

    Sean Lange (4/27/2012)


    OK so you want the most recent TO_PAY_RATE? I think we can do this.

    The only thing I changed from your original was to remove the extra temp table....

  • RE: How to convert this XML into columns

    But let's continue with the original stored proc code I gave you:

    ALTER PROCEDURE [dbo].[WEB_HR_GetRateHistory]

    (

    @ORG_LEVEL_ID INT,

    @EMP_ID INT

    )

    AS

    BEGIN

    DECLARE @x XML;

    CREATE TABLE #RATE_HISTORY

    (

    EMP_NAME...

  • RE: How to convert this XML into columns

    Sean Lange (4/27/2012)


    OK I realized your first select was filling your temp table and then you selected from it. Still not 100% what you want for output but here is...

  • RE: How to convert this XML into columns

    Sean Lange (4/27/2012)


    njdevils39 (4/27/2012)


    Sean Lange (4/27/2012)


    This looks excellent!!! I do have a question about your proc. It looks like you want to have this proc return data for 1 employee?...

  • RE: How to convert this XML into columns

    Sean Lange (4/27/2012)


    This looks excellent!!! I do have a question about your proc. It looks like you want to have this proc return data for 1 employee? If we used...

  • RE: How to convert this XML into columns

    We have some major misunderstandings and we have reached many impasses on this topic, ok here is my DDL and Sample DATA. I have decided that we need a fresh...

  • RE: How to convert this XML into columns

    Lynn Pettis (4/9/2012)


    njdevils39 (4/9/2012)


    Sean Lange (4/9/2012)


    Wow here we have another last minute addition to the specs...sheesh.

    The code Lutz posted about 20-30 posts ago was more than 99% of what you...

  • RE: How to convert this XML into columns

    Sean Lange (4/9/2012)


    Wow here we have another last minute addition to the specs...sheesh.

    The code Lutz posted about 20-30 posts ago was more than 99% of what you needed.

    declare @emp_id int...

  • RE: How to convert this XML into columns

    Sean Lange (4/9/2012)


    Not really too hard. Just hard code something like this but with the values you expect.

    select 1 as RowNum, 3 as EMP_ID, 'Whitehead, Molly' as EMP_NAME, 'Silver Manor'...

  • RE: How to convert this XML into columns

    Sean Lange (4/9/2012)


    Well here is the challenge...for some reason our "net nanny" does not allow images from ssc. Maybe somebody else that can view the image can help? Otherwise can...

  • RE: How to convert this XML into columns

    Sean Lange (4/9/2012)


    Can you put together what you want as desired output? Hard code into a table or whatever. That way I have an idea that what I get is...

  • RE: How to convert this XML into columns

    Lynn Pettis (4/9/2012)


    njdevils39 (4/9/2012)


    By the way, I also do not work yet or get paid. I am an unpaid intern learning to advance my programming knowledge.

    And those of us trying...

  • RE: How to convert this XML into columns

    By the way, I also do not work yet or get paid. I am an unpaid intern learning to advance my programming knowledge.

Viewing 15 posts - 16 through 30 (of 117 total)