Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ali351989
Starting Member
2 Posts |
Posted - 2009-03-21 : 16:37:29
|
This is my codeSelect * from (SELECT * FROM Orders INNER JOIN OrdersDetails on Orders.Ord_ID = OrdersDetails.Ord_ID )as tb1 where Ord_ID=120 ;I don't understand this error: The column 'Ord_ID' was specified multiple times for 'tb1'. can someone help me |
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-03-21 : 23:51:52
|
specify the column name than * ord_id is there in orders table and ordersdetails table so that u got error like thatselect orders.ord_id, columns from orders,columnnames for orderdetails from Orders INNER JOIN OrdersDetails on Orders.Ord_ID = OrdersDetails.Ord_ID where orders.ord_id = 120 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-03-22 : 00:10:28
|
In ur select statement, the columnname ord_id is same for two table thats why u got an error.u put an alias name for column or just mention like this Orders.Ord_ID,OrdersDetails.Ord_ID |
|
|
ali351989
Starting Member
2 Posts |
Posted - 2009-03-22 : 02:44:55
|
thank you i just have repair this Select statement, thank you all |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-03-22 : 03:17:31
|
Welcome |
|
|
|
|
|