cursors and column names

Started by John DeSoiabout 23 years ago2 messagesgeneral
Jump to latest
#1John DeSoi
jdesoi@planetc.com

If a cursor selects from multiple tables is there any way to
distinguish columns from two tables that have the same name? The
column information returned does not appear to have any information
to associate a column with a table.

Thanks,

John DeSoi, Ph.D.

#2Richard Huxton
dev@archonet.com
In reply to: John DeSoi (#1)
Re: cursors and column names

On Friday 21 Feb 2003 4:01 am, John DeSoi wrote:

If a cursor selects from multiple tables is there any way to
distinguish columns from two tables that have the same name? The
column information returned does not appear to have any information
to associate a column with a table.

Something very similar came up just the other day. Alias the table names, and
then you can pick them out.

SELECT f.x,f.y,b.x,b.y FROM foo f, bar b;

--
Richard Huxton