Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Copy column

by Joost (Canon)
on Oct 01, 2007 at 21:24 UTC ( [id://642001]=note: print w/replies, xml ) Need Help??


in reply to Copy column

Did you mean to put "" quotes around that statement?

I think you need to specify the columns explicitly for something like this to work. Also you may want to be careful about the kind of quotes you're using (and you may not need any, if your columns and tables aren't named after keywords). So how about

"INSERT INTO $db.$table SELECT '',category,''.'' FROM $db.$oldtable"
Note that I'm assuming you don't need anything BUT the category from the $oldtable.

update: usually if "things don't work" there are error messages. Check your database log and the output of your perl program. This is part of a perl program, yes?

update2: please don't just erase your question and replace it with an answer that doesn't even do what you're asking.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-24 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found