You'll need to uniquely name them like
Select a.field1 as afield1, b.field1 as bfield1
Then use either objRS("afield1") or objRS("bfield1")
-----Original Message-----
From: Chris Hagwood [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 2:30
To: [EMAIL PROTECTED]
Subject: [ASP] table aliases
How do I reference a field name with it's table? I need the same table
twice in a query, and normally I would do:
Select a.field1, b.field1 from table1 as a, table2 as b where a.key=b.key
Then, in the ASP, I want to write objRS("a.field1") but I can't. It says
ordinal cannot be found. Is there a different way that I am supposed to be
doing this?
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential. If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message. Any
representations or commitments expressed in this email are subject to contract.
ntl Group Limited
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/