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: DBD::Sybase 1.01 & queries against temp table
Date: Dec 3 2003 7:06PM

On Wed, 2003-12-03 at 10:55, Jerry Grooms wrote:
> Michael Peppler  writes:
> 
>      > Hmmm - this bit is strange. Why do we think that there is a
>      > result set with a single column. The first query in your set
>      > is a select into, so does not produce any results, and the
>      > second has two columns, no?
> 
> Correct.
> 
>      > Have you tried coding the fetch loop so that you get all of
>      > the result sets?
> 
>      > do { while(@data = $sth->fetchrow_array()) { ....  } }
>      > while($sth->{syb_more_results});
> 
> Bingo!
> 
> With that advice, I can get back to where I was pre-upgrade by:
> 
> o) throwing away first (empty) set  (?)
> o) using fetch loop as you indicated
> 
> Works for me, but I assume a lingering question is why?

Indeed - that select into shouldn't generate a result set at all.

I'll try to set up a similar query here (using Sybase) to see what
sequence I get.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                 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