Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Interpolating subroutine call in SQL INSERT INTO SELECT statement

by KurtSchwind (Chaplain)
on Aug 26, 2015 at 12:34 UTC ( #1140013=note: print w/replies, xml ) Need Help??


in reply to Interpolating subroutine call in SQL INSERT INTO SELECT statement

You might be able to do simple interpolation using nothing but SQL inline with a few subqueries and some trivial math.

If you truley need a perl function to do the job, you'll have to do a select in one call. And then prep an insert data set for a second call.

--
“For the Present is the point at which time touches eternity.” - CS Lewis
  • Comment on Re: Interpolating subroutine call in SQL INSERT INTO SELECT statement

Replies are listed 'Best First'.
Re^2: Interpolating subroutine call in SQL INSERT INTO SELECT statement
by shadowsong (Pilgrim) on Aug 26, 2015 at 12:56 UTC
    If you truley need a perl function to do the job, you'll have to do a select in one call. And then prep an insert data set for a second call.

    That is what I suspected, but I'm very new to Perl and still far from sure of what is and isn't possible.

    Thanks again for the advice. I appreciate it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2019-07-20 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (5 votes). Check out past polls.

    Notices?