good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Database Insert Depending on Data Typeby Olaf (Acolyte) |
on Dec 18, 2007 at 21:37 UTC ( [id://657748]=perlquestion: print w/replies, xml ) | Need Help?? |
Olaf has asked for the wisdom of the Perl Monks concerning the following question:
I'm inserting data into an MSSQL database, but until the actual DBI insert I don't know the data type of the data I'm inserting. I need to use single quotes around the data if it's text and no quotes if it's numeric. I'm going to ignore dates unless that's an easy add on. Is there a way to find out if a variable is numeric, text, or a date? So I'm looking at something like... Just need to know what the 'variable is numeric' part ought to be.
Do you believe in miracles? Yes!
Back to
Seekers of Perl Wisdom
|
|