If you were using DBI you could:

$SQL = "select * from $tablename";
$sth = $dbh->prepare($SQL);
$sth->execute;

while (@record = $sth->fetchrow_array) {
      # each element of @record can be accessed
}

or slim your query down to just selecting the fields you want.

$SQL = "select field1, field2 from $tablename";

Stanley G. Martin
Midwest Consulting Group
Sprint Finance Reengineering
(816) 889-8156
[EMAIL PROTECTED]

-----Original Message-----
From: Perry.Chaturvedi [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 26, 2000 7:21 AM
To: perl-win32-users
Cc: Perry.Chaturvedi
Subject: Data access

I have another situation where I am calling a select subroutine in PERL
based on the table a user selects. This select statement is very basic:

select * from $tablename

>From here how do I pick only the columns of my choice?


Perry Chaturvedi

"Excellence is not a single act, its a daily habit." -Aristotle


---
You are currently subscribed to perl-win32-users as:
[EMAIL PROTECTED]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to 
         [EMAIL PROTECTED]

Reply via email to