Elegant ways to convert '' or 'number' to a number

P

Peter J. Holzer

In particular, this is Oracle. As I understand it, it implements
varchar NULL as a null string.

Nope, its the other way around: You cannot store an empty string in an
Oracle varchar2, it's automatically converted to NULL. Actually, it
looks like '' is just another notation for NULL in Oracle: You can
insert '' into a numeric column (resulting in a null value) and neither
''='' nor ''!='' is true).
It may be DBI,

DBI returns undef if the value is null.

or the database wrappers we've put around it, or other functions
around them,

Probably. So you probably should hunt down that function that converts
undef to '' and check whether its really supposed to do that and whether
its the right function for the problem.

hp
 
R

Rainer Weikusat

Rainer Weikusat said:
[...]
Contrary to what Rainer probably thinks numbers and strings aren't
the same in Perl

Assumptions you make about other people's thoughts are YOUR thoughts.

.... and isn't it amazing that one can get as old as this guy probably
is and still not outgrow his "young, dumb and full of cum" manners?
This person has probably been living off other people's taxes for
longer than I had the mispleasure to be aware of him, this being a
good ten years, and despite that he must be close to a pension most
people could only dream of, he still sees the necessity to 'fight
competition' ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top