problem in update statement

  • set @IDXNAME ='cse0123'

    update MARK_TEMP set @IDXNAME=a.ExamMark from cycletest a,MARK_TEMP b

    where a.ExamMark in

    (select b.ExamMark from MARK_TEMP a ,CycleTest b where

    b.Semester =@Semester AND b.TestName = @TestName and

    b.Batch=@Batch and b.Branch=@Branch and b.Subjectcode=@Subjectcode and

    a.StudentRollnumber=b.StudentRollnumber )and a.Semester =@Semester AND

    a.TestName = @TestName and

    a.Batch=@Batch and a.Branch=@Branch and a.Subjectcode=@Subjectcode and

    a.StudentRollnumber=b.StudentRollnumber

    the problem is the value is not set at @IDXNAME check this plz reply as soon

    thanks

  • your requirement is not clear. Can you specify more on what u want to do?



    Pradeep Singh

  • WE USE A UPDATE QUERY IN STOREPROCEDURE IN WHILE LOOP

    USE PARAMETER PASSING TO @IDXNAME .FOR UPDATE MORE THEN ONE ROWS BUT DOESN'T WORK

    @IDXNAME=(CSE0123,CSEO124,CSE0125.......CSEN)-------->COLUMN NAMES

    update MARK_TEMP set @IDXNAME=a.ExamMark from cycletest a,MARK_TEMP b

    where a.ExamMark in

    (select b.ExamMark from MARK_TEMP a ,CycleTest b where

    b.Semester =@Semester AND b.TestName = @TestName and

    b.Batch=@Batch and b.Branch=@Branch and b.Subjectcode=@Subjectcode and

    a.StudentRollnumber=b.StudentRollnumber )and a.Semester =@Semester AND

    a.TestName = @TestName and

    a.Batch=@Batch and a.Branch=@Branch and a.Subjectcode=@Subjectcode and

    a.StudentRollnumber=b.StudentRollnumber

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

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