Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: How to read batches of SQL from a file in Perl

by KurtSchwind (Chaplain)
on Oct 25, 2007 at 02:05 UTC ( [id://647057]=note: print w/replies, xml ) Need Help??


in reply to Re: How to read batches of SQL from a file in Perl
in thread How to read batches of SQL from a file in Perl

Wouldn't it be nicer and more flexible to allow people to specify the seperator? I like the idea of essentially slurping the files in and specifying the break as a NEWLINEgoNEWLINE as you did, but I think that a semi-colon is more common.

I realize that the stated assumption was that the statements end with a 'go', but it would be such a minor change to make it so much more flexible.
  • Comment on Re^2: How to read batches of SQL from a file in Perl

Replies are listed 'Best First'.
Re^3: How to read batches of SQL from a file in Perl
by erix (Prior) on Oct 25, 2007 at 14:32 UTC

    A similar module is SQL::Script, which seems like a good idea (and it has the separator :)

Re^3: How to read batches of SQL from a file in Perl
by mpeppler (Vicar) on Oct 26, 2007 at 14:02 UTC
    The default for Sybase isql scripts is to end with "go", so it makes sense to do it this way.

    Other separators can of course be used - it all depends on what your purpose is.

    Michael

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2024-04-24 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found