Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: CREATE TABLE DDL from DBI Statement

by dokkeldepper (Friar)
on Jul 22, 2008 at 05:58 UTC ( [id://699210]=note: print w/replies, xml ) Need Help??


in reply to CREATE TABLE DDL from DBI Statement

"I want to be able to generate the DDL (CREATE TABLE ...) that could hold the returned rows."

Why dont you do a

SELECT * INTO <target> FROM <sourcetable>
and a
TRUNCATE <target>
afterwards?

Replies are listed 'Best First'.
Re^2: CREATE TABLE DDL from DBI Statement
by whereiskurt (Friar) on Jul 22, 2008 at 13:12 UTC

    That would work fine if everything was in the same spot. I'm actually SELECTing records from a remote DB2, and then trying to loosely 'mirror' them locally to a SQLite file.

    Kurt

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-18 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found