var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Teradata - Converting Date Format Q
I need a way to execute a select statement where values are being passed dynamically from an ASP page. Everything is fine if I execute a query like this...
SELECT * FROM TableName
WHERE Col1 = '12-1-2003'
AND Col2 = '234';
The problem is the format of the date (which is dynamically generated from a 3rd party calendar app) is pumped into the field in mm/dd/yyyy format.
If left like this, Teradata gives me an error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)
[NCR][Teradata RDBMS] A character string failed conversion to a numeric value.
Which is because of the improperly formatted date. Is there a way I can convert this to the proper format within the SQL statement. The dynamically built statement looks like this:
SQL = SQL & "TableName = '" & Request.Form("date") & "' " _
& "order by Column1 "
The simple solution would be to write a function or expression that will reformat the date for you "on the fly" into the ISO format used by Terradata.