Click here to Skip to main content
15,921,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello
I have three tables in data base

Table1 : Product

{

productId ( Primary Key )
productImage

}

Table2 :ProductLoc //This table don't have primary key

{

culture_id
Productid foreignkey
ProductName

}

Table3 : Orders

{
orderid PrimaryKey
name
mobile
productid foreignkey
}

I want To select this item

Name,Mobile ------------From Orders
Product Name ------------From ProductLoc

I try this code but Error Occured

SQL
select Name,Mobile,ProductName
From Orders ,ProductLoc
Where Orders.id=ProductLoc.ProductId


Msg 208, Level 16, State 1, Line 1
Invalid object name 'Orders'.

Please Help Me
Posted
Updated 21-Feb-11 16:14pm
v2

1 solution

how about like this
"Select Name,Mobile,ProductName From Orders Join ProductLoc on Orders.Productid=ProductLoc.productid"
Let me know whether it is ok or not.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900