Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Merging Arrays into a Hash with Substitutions

by graff (Chancellor)
on Apr 09, 2004 at 04:19 UTC ( [id://343847]=note: print w/replies, xml ) Need Help??


in reply to Merging Arrays into a Hash with Substitutions

I realize that this is probably not the sort of thing you're looking for, but it's a handy thing to know about, and could help, if you are using SQL queries:

You can specify in the query what to return for a given field when the row being returned happens to have a null in that field. I don't know whether this is the sort of thing where the syntax varies from one database system to the next, but in Oracle, you would do something like this:

"select id,NVL(field_a,' '),NVL(field_b,'NO_B') from table..."
The first arg to NVL() is a field to be returned, and the second arg is a string to be returned when the given field is null. It adds a bit of flexibility when doing queries, and can help simplify the perl scripting.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-19 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found