Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: bad database field name

by mammynum (Initiate)
on Feb 11, 2004 at 20:12 UTC ( #328363=note: print w/replies, xml ) Need Help??

in reply to bad database field name

$QS = q{ SELECT po.POId2, i.cwdItemNum, i.ItemColor, i.size1, i.size2, i.size3, i.size4, i.size5, i.size6, i.size7, i.ItemDescription, i.ItemRetailCost, po.VendorNum, i.VenItemNum, i.itemCatCode, i.ItemLine, i.ItemR/E, i.ItemOurCost FROM tblPurchaseOrder po, tblPOItems i WHERE po.exportToDMMS=? AND i.itemPOID=po.POId2 ORDER BY i.itemPOID, i.sortNum};

BazB added code tags

Replies are listed 'Best First'.
Re: Re: bad database field name
by monktim (Friar) on Feb 11, 2004 at 20:22 UTC
    To properly format that, please wrap your code in code tags. If you don't you could end up here Worst Nodes. There is a subset of HTML that monks are allowed to use. You can read about that here. Writeup Formatting Tips.

    You'll need to quote the column "i.ItemR/E" to get it to work. Like blue_cowdawg suggests, this is a SQL problem not a Perl one. If you cut the SQL code out and run it in isql or whatever SQL environment you use, you'll see that the dB Server doesn't understand the SQL. It can be difficult for a new Perl programmer to determine where the error is. Is it in the dB or is it in Perl? Please look at my earlier post and click in the link "Before asking a database related question". gmax has an excellent writeup about this. It will probably be a big help.

    Good luck and please go back and wrap your code in code tags.

Re: Re: bad database field name
by blue_cowdawg (Monsignor) on Feb 11, 2004 at 20:20 UTC

    Your SQL looks wonderful. But what is the Perl error you are getting? What Perl code are you execting that is emitting an error?

    Peter L. Berghold -- Unix Professional
    Peter at Berghold dot Net
       Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://328363]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-09-28 17:10 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (124 votes). Check out past polls.