problem solution required..

  • select * from A

    left outer join (select top 1 consent,rowno_custsinc_cust

    from B

    where A.rowno = B.rowno_custsinc_cust

    order by chkdate,chktime desc)C

    on A.rowno_custsinc_cust = A.rowno

    Server: Msg 4104, Level 16, State 1, Procedure ##ABC, Line 113

    The multi-part identifier "A.rowno" could not be bound.

    Please help me to correct this qry...

  • does tableA have a column named rowno ?

    also on a join condition it does not make much sense for the join condition to reference the same table

  • yes.

  • on a join condition it does not make much sense for the join condition to reference the same table.

  • Try an outer apply rather than a join , judging by your use of top that is what you need.



    Clear Sky SQL
    My Blog[/url]

  • my qry like this: the under lined part having the error!!

    select * from A

    left outer join (select top 1 consent,rowno_custsinc_cust

    from B

    where A.rowno = B.rowno_custsinc_cust

    order by chkdate,chktime desc)C

    on C.rowno_custsinc_cust = A.rowno

    Server: Msg 4104, Level 16, State 1, Procedure ##ABC, Line 113

    The multi-part identifier "A.rowno" could not be bound.

    Please help me to correct this qry...

  • If i am reading this correctly, you don't really need that where clause at all, as you are joining on the same clause which will restrict it there.

    how about post some sample data , table structure, and what you are trying to acheive and it will make it easier for us to help

  • I think you just need to remove that whole line with the underlined part. If that doesn't work, please provide DDL, sample data and expected results.

    John

  • Thanks .It's Done !!!

Viewing 9 posts - 1 through 9 (of 9 total)

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