Hi All
I am finding the duplicates rows from two tables and
inserting into temptable
When i used this query to search duplicate rows its giving me result successfully.
as i want ,
======
SELECT * FROM
TrnBal , ullr
WHERE TrnBal.LR_no = ullr.LR_No
=======
But when try to insert the same result into temptable its giving me error.
here is my second query ,
===
Insert into duprow (LR_No,Lr_Date ,Bkg_Stn ,FrmShort ,Dst,ToShort,Consignor_Name,
Consignee_Name ,Pvt_Mark ,Discription ,Article,Weight,Value ,Pmt_Mode ,DoorDel, LR_Remark, Freight ,BC ,Handling ,DDel , LC ,Others ,S_Tax ,Amount ,Initial ,Truck_No , Report_No, Rep_Date ,Trk_From , Trk_To , Arv_No ,Arv_Date ,L_Stat)
Select LR_No,Lr_Date ,Bkg_Stn ,FrmShort ,Dst ,ToShort ,Consignor_Name,
Consignee_Name ,Pvt_Mark, Discription ,Article,Weight,Value ,Pmt_Mode ,DoorDel ,LR_Remark, Freight ,BC ,Handling ,DDel , LC ,Others ,S_Tax ,Amount ,Initial ,Truck_No ,Report_No ,
Rep_Date ,Trk_From , Trk_To , Arv_No ,Arv_Date ,L_Stat
FROM TrnBal,ullr
Where TrnBal.LR_No = ullr.LR_No
==============
ERROR :
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'LR_No'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'Lr_Date'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'Bkg_Stn'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'FrmShort'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'Dst'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'ToShort'.
Msg 209, Level 16, State 1, Line 4
Ambiguous column name 'Consignor_Name'.......more.... with all field.
Guys i am stuck in Please help me ,
Any Help will be highly appreciated..
Waiting for your reply....????
Thanks in Advance.