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

Re: need to parse firts part of SQL-query (regex question)

by KurtSchwind (Chaplain)
on Jan 17, 2008 at 16:28 UTC ( [id://662912]=note: print w/replies, xml ) Need Help??


in reply to need to parse firts part of SQL-query (regex question)

This is a tricky bit of code. And you can use the tokenizer modules for SQL.

However, another way is to take this in 2 steps. Using a temp variable for your sql, you could actually re-write the comas inside the concat to something else. Split on comas. And then take the part with the concat and return the values to comas again. For example, if you know you never have '#' characters in your sql, you could temporarily replace the comas in your concat to #s.

--
I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
  • Comment on Re: need to parse firts part of SQL-query (regex question)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found