Multiple Update Records

  • Hi to All;

    Pls any one to Help This;

    The Following Qry to Update The Records;

    Update GradePointCalculation_Bkup Set Sgpa=T2.Sgpa,Cgpa=T3.Cgpa Where Registerno in (

    select A.Registerno From (Select T1.REgisterno,T2.Sgpa,T3.Cgpa From #temparrearTable1 T1

    Inner join #temparrearTable2 T2 on T1.Registerno=T2.Registerno

    Inner Join #temparrearTable3 T3 on T3.Registerno=T1.REgisterno) as a)

    But to run The Qry to thrown the Following Error

    Msg 4104, Level 16, State 1, Procedure StudentmarkDet, Line 87

    The multi-part identifier "T2.Sgpa" could not be bound.

    Msg 4104, Level 16, State 1, Procedure StudentmarkDet, Line 87

    The multi-part identifier "T3.Cgpa" could not be bound.

    Pls Help this;

    this is an Table Structure:

    create table #temparrearTable1(

    registerno varchar(12),

    courseid varchar(9),

    GradePoint numeric(3)

    )

    create table #temparrearTable2(

    registerno varchar(12),

    courseid varchar(9),

    Sgpa numeric(3)

    )

    create table #temparrearTable3(

    registerno varchar(12),

    courseid varchar(9),

    Cgpa numeric(3)

    )

    Thanks ;

    A.Faijurrahuman

    faijurrahuman17@gmail.com

  • update aa

    set aa.Sgpa = a.Sgpa,

    aa.Cgpa = a.Cgpa

    from

    GradePointCalculation_Bkup as aa,

    (Select T1.REgisterno,T2.Sgpa,T3.Cgpa From #temparrearTable1 T1

    Inner join #temparrearTable2 T2 on T1.Registerno=T2.Registerno

    Inner Join #temparrearTable3 T3 on T3.Registerno=T1.REgisterno) as a

    where

    aa.Registerno = a.REgisterno

  • Update gpcb

    Set Sgpa=T2.Sgpa,Cgpa=T3.Cgpa

    From GradePointCalculation_Bkup gpcb

    INNER JOIN #temparrearTable1 T1 T1.Registerno = gpcb.Registerno

    Inner join #temparrearTable2 T2 on T1.Registerno=T2.Registerno

    Inner Join #temparrearTable3 T3 on T3.Registerno=T1.REgisterno

    --Divya

  • Hi Diva;

    Thanks for u r response ;

    With regards;

    A.Faijurrahuman

    Programmer

    Coimbatore

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply