Give the field names aliases like so :-
SELECT a.field1 AS tblA_Field1, b.field1 AS tblB_Field1 FROM table1 a, table2 b WHERE
a.key=b.key
Then refer to the aliases - objRS("tblA_Field1") etc
Dan
www.diado.com
-----Original Message-----
From: Chris Hagwood [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 14: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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/