Thursday, 20 December 2012

Storing TIME(0) or Time(6) columns using SQL Assistant can be tricky - Learn How

Discrepancy in storing TIME(0) columns using SQL Assistant-
The default driver available to SQL Assistant is ODBC, we have to manually set it to Teradata.NET driver if we have TIME(0) columns in the create table statement.

Example
ODBC driver:
CREATE SET TABLE alex_arp_tbls_prd.date_test1 ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
      val_date INTEGER FORMAT '99:99:99')
PRIMARY INDEX ( val_date );


Teradata.Net Driver:
CREATE SET TABLE alex_arp_tbls_prd.date_test2 ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
      val_date TIME(0))
PRIMARY INDEX ( val_date );


Developers should be really careful while migrating code from SQL Assistant to Bteq mode.

No comments:

Post a Comment

Please share your thoughts and let us know the topics you want covered