Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Interpolating subroutine call in SQL INSERT INTO SELECT statement

by shadowsong (Pilgrim)
on Aug 26, 2015 at 14:30 UTC ( #1140039=note: print w/replies, xml ) Need Help??


in reply to Re: Interpolating subroutine call in SQL INSERT INTO SELECT statement
in thread Interpolating subroutine call in SQL INSERT INTO SELECT statement

But what is the function of the subroutine to which you want to pass the value of COLUMN3 ? Could you use an existing SQL function in your SELECT query? Or could you build a stored routine for your DB?

It did not even cross my mind to attempt either using an existing SQL function or building a stored routine within my DB and using that.

I have written a Perl function that takes a string and substitutes out certain characters from that string (the characters I'm taking out belong to a hash that I can extend as and when I need to

I'm not sure whether I can use an existing SQL function to achieve this, but it seemed like a good idea to have that function coded in Perl - seeing as how great Perl is with RegExps and the other programmer likely to be maintaining the code knows Perl..

Thanks for the advice! Once I get a handle on creating stored procedures in MSSQL I'm sure I'll be looking for every excuse to use them.

  • Comment on Re^2: Interpolating subroutine call in SQL INSERT INTO SELECT statement

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2019-10-22 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?