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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query across multiple tables with same field names

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-20 : 22:54:47
Daniel writes "Hi,

I am running into a bit of a problem. I am writing a query for an ASP page and have develoepd the following query:

msql = "SELECT store_receipt.order_id, store_receipt.shopper_id, store_receipt_item.sku, store_product.name, store_receipt.date_entered, store_shopper.name, store_shopper.email, store_shopper.phone

FROM ((store_shopper INNER JOIN store_receipt ON store_shopper.shopper_id = store_receipt.shopper_id)

INNER JOIN store_receipt_item ON store_receipt.order_id = store_receipt_item.order_id) INNER JOIN store_product ON store_receipt_item.sku = store_product.sku

WHERE (((store_receipt.order_id)= '"& OrderID &"'));"

set rsRMA = server.CreateObject("adodb.recordset")
rsRMA.Open msql,Application("store_ConnectionString"),adOpenStatic

*(I've included spaces for formatting reasons only!)

Anyway, how can I distinguish between shopper.name and product.name when I call it in an inline ASP script (i.e =rsRMA("name")

All help appreciated!

Daniel"
   

- Advertisement -