Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Extracting only required length in a column in perl DBI

by Thomas Kennll (Acolyte)
on Jan 15, 2013 at 12:48 UTC ( #1013388=note: print w/ replies, xml ) Need Help??


in reply to Re: Extracting only required length in a column in perl DBI
in thread Extracting only required length in a column in perl DBI

That will work.. But, I actually wanted to extract 6 characters for the 3 column... How do I achieve that??


Comment on Re^2: Extracting only required length in a column in perl DBI
Re^3: Extracting only required length in a column in perl DBI
by marto (Bishop) on Jan 15, 2013 at 12:53 UTC

    Replace the 3 in my example with a 6, you should consider learning basic SQL.

      What I meant is something like this my ($ansb_cktid, $ansb_mcn, $ansb_soc) =unpack("A3 A3 A6")

        I'm of the mind set that you shouldn't pull back more data than you need then post process it, when you can easily return only what you need.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-27 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls