On Wed, 2002-05-29 at 18:35, Lance Prais wrote: > Thank you. I scaled down the SQL and tested it in SQL (records returned) > and then in the script(no records returned). This is bizarre to me. > Actually it it is a string with the values being for example "1-99999"
Do yo mean $ln contains the value "1-99999"? The following will strip spaces from a string: $ln =~ s/ //g; If it worked before you may want to eschew using the binding feature and just plop $ln directly into the query (just make certain to call execute with no parameters). > > > Does perl default to a string? If I put "" or '' around the? Like so '?' > Or "?", I get an error message therefore I know I am not going down the > write path. Could it have something to do with permissions? I have them > set for execute. > > Thanks > Lance > > -----Original Message----- > From: Chas Owens [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 4:11 PM > To: Lance Prais > Cc: Perl > Subject: RE: Problem reading a file and passing a variable > > On Wed, 2002-05-29 at 17:05, Lance Prais wrote: > > [Chas], > > Thank you, you made me realize the value of indention like never before. > > In the past I used the "=?" to return results form the query but in this > > case when I used in and run this script it does not error out but instead > > the query returns no values? Could that be because there are leading or > > trailing spaces. My understanding is that the Chomp would take care of > that. > > Am I wrong in my assumption? > > > > Thanks again > > Lance > > > > The chomp function removes the trailing newline character (actually it > removes whatever is in $/ variable, but that is usually \n so it doesn't > really matter). In this case $ln looks like a number so you could say > "$ln += 0;" which would force $ln to contain a number instead of a > string (thus getting rid of spaces). If spaces are not the problem then > try running the query by hand in sql*plus (or toad if you have it) to > make sure it is not a problem with the query. > > -- > Today is Prickle-Prickle the 3rd day of Confusion in the YOLD 3168 > This statement is false. > > Missile Address: 33:48:3.521N 84:23:34.786W > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Today is Prickle-Prickle the 3rd day of Confusion in the YOLD 3168 You are what you see. Missile Address: 33:48:3.521N 84:23:34.786W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]