[thelist] Same Column Name Different Tables
Rob Smith
rob.smith at THERMON.com
Wed Mar 12 13:35:36 CST 2003
Hi list,
I've got a about 7 different tables organized like this:
Table_A
--------------------------------------
ProdMediaID int Not Null
ProductAuto int 4
Link1 varchar 128
Title1 varchar 128
Link2 varchar 128
Title2 varchar 128
...
Table_B
--------------------------------------
ProdMediaID int Not Null
ProductAuto int 4
Link1 varchar 128
Title1 varchar 128
Link2 varchar 128
Title2 varchar 128
...
and so on. (In some instances the Link/Title combo goes to 24)
My SQL query is to the tune of:
Recordset1.Source = "SELECT p.productID, p.ProductDescription, Table_A.*,
Table_B.* FROM A_URLS Table_A, B_URLS Table_B WHERE bunch_of_stuff =
other_stuff ORDER BY that"
Now (finally) here's my question..
Can I do this:
<a href="<%=Recordset1.fields.item("Table_A.Link1").value%>" target="_top"
title="<%=Recordset1.fields.item("Table_A.Title1").value%>"><%=Recordset1.fi
elds.item("Table_A.Title1").value%></a>
If I can't, how can I reference or differentiate same column names from
different tables in my ASP code?
For good measures, my LinksX column contains paths, my TitleX column
contains the link title/hyperlink text.
Rob.Smith
More information about the thelist
mailing list