On Mon, 2003-03-03 at 09:33, Tim Bunce wrote:
> Specifically, which DBD's include the table name in {NAME}?
> In other words, what does:
>
> $sth = $dbh->prepare("SELECT table.field FROM table"); # note table.field
> $sth->execute;
> print "NAME_lc = '$sth->{NAME_lc}->[0]' \n";
>
> for the drivers you use?
>
> Is it 'field' or 'table.field'?
DBD::Sybase will report 'field'.
In addition, if two columns have the same name this will not get
disambiguated by the driver (or by the API):
my $sth = $dbh->prepare("select u.name, l.name from master..sysusers u,
master..syslogins l where u.suid = l.suid");
$sth->execute;
print "@{$sth->{NAME}}\n";
# prints "name name"
Michael
--
Michael Peppler Data Migrations, Inc.
[EMAIL PROTECTED] http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html