Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Copy column

by Joost (Canon)
on Oct 01, 2007 at 21:24 UTC ( #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.


Comment on Re: Copy column
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-09-17 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (99 votes), past polls