Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Testing and database date functions

by hmerrill (Friar)
on Dec 10, 2004 at 13:06 UTC ( [id://413828] : note . print w/replies, xml ) Need Help??

in reply to Re^2: Testing and database date functions
in thread Testing and database date functions

Ok then. I don't know of an existing module that does that, so I'm guessing you'll have to roll your own. Shouldn't be that tough - you can use the database handle function get_info. Here are the get_info numbers that can be used as parameters:
Type Name Example A Example B ---- -------------------------- ------------ ---------------- 17 SQL_DBMS_NAME 'ACCESS' 'Oracle' 18 SQL_DBMS_VER '03.50.0000' '08.01.0721 ...' 29 SQL_IDENTIFIER_QUOTE_CHAR '`' '"' 41 SQL_CATALOG_NAME_SEPARATOR '.' '@' 114 SQL_CATALOG_LOCATION 1 2
so you could use
my $dbms_name = $dbh->get_info(17);
your new function could take in the $dbh handle, and call get_info(17) to get the dbms name, and once you know the name, you can construct the database specific SQL that will get you the day of the week for that database.