• su88rao (5/16/2013)


    this is for table1 i,e t1

    P1nvarchar(255)Checked

    S1nvarchar(255)Checked

    B1nvarchar(255)Checked

    H1 -b1intChecked

    H1 -s1intChecked

    S2 -b1intChecked

    S2 -s1intChecked

    J1 -b1intChecked

    J1 -s1intChecked

    and this is for table 2 i,e t2

    P1nvarchar(50)Checked

    S1nvarchar(50)Checked

    B1nvarchar(50)Checked

    Funnvarchar(50)Checked

    Valint Checked

    Locnvarchar(50)Checked

    and i have mentioned values and desired output in my previous file... plz check the txt document which is attached u willl get brief idea about it

    I cannot run anything from what you have posted.

    DDL should look like that:

    CREATE TABLE MyTable

    (

    Col1 INT,

    Col2 CHAR(1)...

    )

    Test data should be like that:

    INSERT MyTable SELECT 1, 'a',...

    INSERT MyTable SELECT 2, 'b',...

    And the code you post should be runnable.

    Then, I can execute it in my SSMS and provide you with solution for your query.

    The amount of time you have spend on posting incomplete information is already few times more than if you would read the article and provide details as suggested above.

    There is another way to have your answer. Wait for someone who will be happy to work from information you have posted. I'm sure it will get answered eventually. However, it may take much much longer time...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]