PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Help pls.
Date: Oct 5 1999 2:06PM

Manjeet Kalsi writes:
 > 
 > Can someone tell what's wrong with the following script ...
 > 
 > $dbh->ct_execute("select name,si,tl,cr,cl,ds,dt,ro,do,su,an,ab,nf,ai,dn from
 > tempdb..dbo_tbl order by name");
 > 
 > while ($dbh->ct_results($restype) == CS_SUCCEED)
 > {
 >  # Skip non-fetchable results:
 >  next unless $dbh->ct_fetchable($restype);
 > 
 >  # Retrieve actual data rows:
 >  while (@DataRow = $dbh->ct_fetch)
 >  {
 >   $ColCtr = 0;
 > 
 >   foreach $Data (@DataRow)
 >   {
 >    if ($ColCtr == 0) { print "\nDATABASE: $Data\n"; }
 >    if (($ColCtr == 1) && ($Data == "Y")) { print "\tselect into/bulkcopy\n"; }

You need 
	$Data eq 'Y'
because you are doing a string comparison...

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com