cogdmod_td.ini 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. ;***********************************************************************
  2. ;Licensed Materials - Property of IBM
  3. ;
  4. ;BI and PM: UDA
  5. ;
  6. ;(C) Copyright IBM Corp. 2005, 2020
  7. ;
  8. ;U.S. Government Users Restricted Rights - Use, duplication, or disclosure
  9. ;by GSA ADP Schedule Contract with IBM Corp.
  10. ;
  11. ;Unless specifically authorized by IBM, you may not modify any part of this
  12. ;file. Where modification is authorized, you must reproduce any copyright
  13. ;notices contained in this file and specifically identify which
  14. ;modifications have been made by your organization. YOU ARE SOLELY
  15. ;RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF ANY MODIFICATIONS TO
  16. ;THIS FILE AND ASSUME ALL RISKS ASSOCIATED WITH THE USE AND DISTRIBUTION
  17. ;OF THE MODIFIED FILE. IBM will not provide support relating to
  18. ;unauthorized changes you make to this file.
  19. ;***********************************************************************
  20. ; $Header: //uda/main/prod/dmd/sgi/odbc35/teradata/cogdmod_td.ini#14 $
  21. ;
  22. ; Module:
  23. ; cogdmod_td.ini
  24. ;
  25. ; Purpose:
  26. ; This module contains the Teradata SQL information.
  27. ;
  28. ; Notes:
  29. ; Do NOT modify this file. Doing so could result in unknown behavior
  30. ; by the ODBC gateway, possibly resulting in application aborts.
  31. ;
  32. ;
  33. ; XCW: This version is cloned from v58 of cogdmod_teradata.ini file. Any
  34. ; change of cogdmod_teradata.ini file after that version must be
  35. ; propagated into here
  36. ;
  37. ; ************************************************************************
  38. [Builtin Functions]
  39. ; If the second parameter ( size) is not specified, it defaults to
  40. ; one. It can cause "Rigth truncation of character data" error.
  41. c:cast_char(%1bcxdinst {,%2n})=CAST(%1 AS CHAR{(%2)});
  42. d:cast_date(%1cdt)=CAST(%1 AS DATE);
  43. n:cast_decimal(%1cin {,%2n,%3n})=CAST(%1 AS DECIMAL{(%2,%3)});
  44. n:cast_double_precision(%1cn)=CAST(%1 AS DOUBLE PRECISION);
  45. n:cast_float(%1cn)=CAST(%1 AS FLOAT);
  46. n:cast_integer(%1cin)=CAST(%1 AS INTEGER);
  47. c:cast_numberToString(%1bcdinst)=CAST(%1 AS CHAR(254));
  48. n:cast_numeric(%1cin {,%2n,%3n})=CAST(%1 AS NUMERIC{(%2,%3)});
  49. n:cast_real(%1cn)=CAST(%1 AS REAL);
  50. n:cast_smallint(%1cin)=CAST(%1 AS SMALLINT);
  51. ; for Teradata, the second parameter ( size ) is mandatory
  52. c:cast_varchar(%1bcxdinst {,%2n})=CAST(%1 AS VARCHAR(%2));
  53. t:localtime({%1n})=CURRENT_TIME;
  54. s:localtimestamp({%1n})=CURRENT_TIMESTAMP;
  55. ;
  56. ; Business Functions for Date Calculations
  57. ;
  58. d:_add_days(%1d,%2n)=( %1 + cast( ( %2 ) as INTERVAL DAY(4) ) );
  59. s:_add_days(%1s,%2n)=( %1 + cast( ( %2 ) as INTERVAL DAY(4) ) );
  60. d:_add_months(%1d,%2n)=ADD_MONTHS( %1, %2 );
  61. s:_add_months(%1s,%2n)=ADD_MONTHS( %1, %2 );
  62. d:_add_years(%1d,%2n)=ADD_MONTHS( %1, ( (%2) * 12 ) );
  63. s:_add_years(%1s,%2n)=ADD_MONTHS( %1, ( (%2) * 12 ) );
  64. n:_days_between(%1d,%2d)=(%1 - %2);
  65. ; overload this function for timestamp parameters to take into account the TIME part of the timestamps that can impact the result (more or less 1 day)
  66. n:_days_between(%1s,%2s)=case when ((%1 - CAST(CAST(%1 AS DATE) AS TIMESTAMP) ) HOUR TO SECOND < (%2 - CAST(CAST(%2 AS DATE) AS TIMESTAMP) ) HOUR TO SECOND) and (CAST (%1 AS DATE) - CAST (%2 AS DATE) > 0) then CAST (%1 AS DATE) - CAST (%2 AS DATE) - 1 when ((%1 - CAST(CAST(%1 AS DATE) AS TIMESTAMP) ) HOUR TO SECOND > (%2 - CAST(CAST(%2 AS DATE) AS TIMESTAMP) ) HOUR TO SECOND) and (CAST (%1 AS DATE) - CAST (%2 AS DATE) < 0) then CAST (%1 AS DATE) - CAST (%2 AS DATE) + 1 else CAST (%1 AS DATE) - CAST (%2 AS DATE) end;
  67. ;ODBC driver version greater than 3.6.0.1 is suitable for the actual _months_between definition
  68. n:_months_between(%1ds,%2ds)=((EXTRACT( YEAR from %1 ) - EXTRACT( YEAR from %2 )) * 12 + EXTRACT( MONTH from %1 ) - EXTRACT( MONTH from %2 ) + CASE WHEN cast(%1 as DATE ) > cast( %2 as DATE ) THEN CASE WHEN EXTRACT( DAY from %1 ) < EXTRACT( DAY FROM %2 ) AND EXTRACT( DAY from LAST_DAY(%1) ) <> EXTRACT( DAY from %1 ) THEN -1 ELSE 0 END WHEN cast(%1 as DATE ) < cast( %2 as DATE ) THEN CASE WHEN EXTRACT( DAY from %1 ) > EXTRACT( DAY from %2 ) AND EXTRACT( DAY from LAST_DAY(%2) ) <> EXTRACT( DAY from %2 ) THEN 1 ELSE 0 END ELSE 0 END);
  69. n:_years_between(%1ds,%2ds)=((EXTRACT( YEAR from %1 ) - EXTRACT( YEAR from %2 )) * 12 + EXTRACT( MONTH from %1 ) - EXTRACT( MONTH from %2 ) + CASE WHEN cast(%1 as DATE ) > cast( %2 as DATE ) THEN CASE WHEN EXTRACT( DAY from %1 ) < EXTRACT( DAY FROM %2 ) AND EXTRACT( DAY from LAST_DAY(%1) ) <> EXTRACT( DAY from %1 ) THEN -1 ELSE 0 END WHEN cast(%1 as DATE ) < cast( %2 as DATE ) THEN CASE WHEN EXTRACT( DAY from %1 ) > EXTRACT( DAY from %2 ) AND EXTRACT( DAY from LAST_DAY(%2) ) <> EXTRACT( DAY from %2 ) THEN 1 ELSE 0 END ELSE 0 END)/12;
  70. n:_days_to_end_of_month(%1ds)=(EXTRACT( DAY FROM (ADD_MONTHS(%1 - CAST( EXTRACT( DAY FROM %1 ) AS INTERVAL DAY) + INTERVAL '1' DAY, 1) - INTERVAL '1' DAY)) - EXTRACT(DAY FROM %1));
  71. n:_age(%1ds)=;
  72. d:_first_of_month(%1d)=(%1 - CAST( EXTRACT( DAY FROM %1 ) AS INTERVAL DAY ) + INTERVAL '1' DAY);
  73. s:_first_of_month(%1s)=(%1 - CAST( EXTRACT( DAY FROM %1 ) AS INTERVAL DAY ) + INTERVAL '1' DAY);
  74. d:_last_of_month(%1d)=(ADD_MONTHS( ( %1 - CAST( EXTRACT( DAY FROM %1 ) AS INTERVAL DAY ) + INTERVAL '1' DAY ), 1 ) - INTERVAL '1' DAY);
  75. s:_last_of_month(%1s)=(ADD_MONTHS( ( %1 - CAST( EXTRACT( DAY FROM %1 ) AS INTERVAL DAY ) + INTERVAL '1' DAY ), 1 ) - INTERVAL '1' DAY);
  76. s:_make_timestamp(%1n,%2n,%3n)=;
  77. n:_ymdint_between(%1ds,%2ds)=;
  78. n:_day_of_year(%1ds)= CAST( ( CAST (%1 AS DATE) + 1 - CAST( ( CAST( EXTRACT( YEAR FROM (CAST ( %1 AS DATE) )) AS CHAR(4)) || '-01-01' ) AS DATE) ) AS INTEGER);
  79. n:_round(%1n, %2n)=CASE WHEN (%1) < 0 THEN (CAST( ( (%1) * ( 10 ** (%2) ) - 0.5 ) AS BIGINT ) / ( 10 ** (%2) )) ELSE (CAST( ( (%1) * ( 10 ** (%2) ) + 0.5 ) AS BIGINT ) / ( 10 ** (%2) )) END;
  80. n:_week_of_year(%1ds)=;
  81. n:_day_of_week(%1ds, %2n)=;
  82. ;
  83. ; Additional Business Functions for Date Calculations
  84. ;
  85. t:_add_hours(%1t,%2n)=( %1 + cast( ( %2 ) as INTERVAL HOUR(4) ) );
  86. s:_add_hours(%1s,%2n)=( %1 + cast( ( %2 ) as INTERVAL HOUR(4) ) );
  87. t:_add_minutes(%1t,%2n)=( %1 + cast( ( %2 ) as INTERVAL MINUTE(4) ) );
  88. s:_add_minutes(%1s,%2n)=( %1 + cast( ( %2 ) as INTERVAL MINUTE(4) ) );
  89. t:_add_seconds(%1t,%2n)=( %1 + cast( ( %2 ) as INTERVAL SECOND(4,0) ) );
  90. s:_add_seconds(%1s,%2n)=( %1 + cast( ( %2 ) as INTERVAL SECOND(4,0) ) );
  91. n:_hours_between(%1ds,%2ds)=;
  92. n:_minutes_between(%1ds,%2ds)=;
  93. n:_seconds_between(%1ds,%2ds)=;
  94. ;
  95. ; Teradata functions equivalent to EE functions
  96. ;
  97. bcxdinst:nullif(%1dbcxdinst, %2dbcxdinst)=(NULLIF(%1, %2));
  98. n:round(%1n, %2n)=CASE WHEN (%1) < 0 THEN (CAST( ( (%1) * ( 10 ** (%2) ) - 0.5 ) AS BIGINT ) / ( 10 ** (%2) )) ELSE (CAST( ( (%1) * ( 10 ** (%2) ) + 0.5 ) AS BIGINT ) / ( 10 ** (%2) )) END;
  99. n:power(%1n,%2n)=((%1) ** (%2));
  100. n:position(%1cx,%2cx)=INDEX(%2,%1);
  101. n:random(%1n,%2n)=RANDOM(%1,%2);
  102. ;
  103. ; New CAST entry for NCHAR and NVARCHAR
  104. ; Added for Trakker #607309
  105. c:coguda#cast_nchar(%1bcxdinst {,%2n})=CAST(%1 AS CHAR(%2));
  106. c:coguda#cast_nvarchar(%1bcxdinst {,%2n})=CAST(%1 AS VARCHAR(%2));
  107. i:coguda#cast_interval(%1)=CAST(%1 AS INTERVAL DAY(4) TO SECOND);
  108. i:coguda#cast_interval_year(%1)=CAST(%1 AS INTERVAL YEAR(4));
  109. i:coguda#cast_interval_year_to_month(%1)=CAST(%1 AS INTERVAL YEAR(4) TO MONTH);
  110. i:coguda#cast_interval_month(%1)=CAST(%1 AS INTERVAL MONTH(4));
  111. i:coguda#cast_interval_day(%1)=CAST(%1 AS INTERVAL DAY(4));
  112. i:coguda#cast_interval_day_to_hour(%1)=CAST(%1 AS INTERVAL DAY(4) TO HOUR);
  113. i:coguda#cast_interval_day_to_minute(%1)=CAST(%1 AS INTERVAL DAY(4) TO MINUTE);
  114. i:coguda#cast_interval_day_to_second(%1)=CAST(%1 AS INTERVAL DAY(4) TO SECOND);
  115. i:coguda#cast_interval_hour(%1)=CAST(%1 AS INTERVAL HOUR(4));
  116. i:coguda#cast_interval_hour_to_minute(%1)=CAST(%1 AS INTERVAL HOUR(4) TO MINUTE);
  117. i:coguda#cast_interval_hour_to_second(%1)=CAST(%1 AS INTERVAL HOUR(4) TO SECOND);
  118. i:coguda#cast_interval_minute(%1)=CAST(%1 AS INTERVAL MINUTE(4));
  119. i:coguda#cast_interval_minute_to_second(%1)=CAST(%1 AS INTERVAL MINUTE(4) TO SECOND);
  120. i:coguda#cast_interval_second(%1)=CAST(%1 AS INTERVAL SECOND(4));
  121. [Database Functions]
  122. ;The scalar functions should be used with escape sequences
  123. c:concat(%1,%2)=\{fn CONCAT(%1, %2)\};
  124. n:mod(%1,%2)=\{fn MOD(%1, %2)\};
  125. [Exceptions Aggregates]
  126. Avg="avg"
  127. Count="count"
  128. Count_Star="count(*)"
  129. Max="max"
  130. Min="min"
  131. Stddev_Pop="stddev_pop"
  132. Stddev_Samp="stddev_samp"
  133. Sum="sum"
  134. Var_Pop="var_pop"
  135. Var_Samp="var_samp"
  136. [Exceptions OLAP Functions]
  137. Olap_Avg="avg"
  138. Olap_Count="count"
  139. Olap_Count_Star="count(*)"
  140. Olap_Max="max"
  141. Olap_Min="min"
  142. Olap_Sum="sum"
  143. Olap_Rank="rank"
  144. Olap_Percent_Rank="percent_rank"
  145. Olap_Row_Number="row_number"
  146. [Exceptions Clauses]
  147. From="from"
  148. Group_By="group by"
  149. Having="having"
  150. Where="where"
  151. ;V2R6 supports the WITH clause, however it supports only one
  152. ;common table expression per WITH clause.
  153. With=
  154. With_Recursive=
  155. [Exceptions Commands]
  156. Call="call "
  157. Delete="delete "
  158. Insert="insert "
  159. Select="select "
  160. Update="update "
  161. Max_Literal_Len="30502"
  162. [Exceptions Delimiters]
  163. Catalog_Delimiter="\""
  164. Schema_Delimiter="\""
  165. Table_Delimiter="\""
  166. Column_Delimiter="\""
  167. Procedure_Delimiter="\""
  168. Wholename_Delimiter=""
  169. [Exceptions General]
  170. Aggregate_In_Expr=T
  171. Aggregate_Value_Expr=T
  172. Boolean_Comparison=F
  173. Correlated_Subqueries=T
  174. Count_Blob=F
  175. Count_Non_Distinct=T
  176. Count_Value_Expr=T
  177. Count_Literal=T
  178. Cross_Product=T
  179. Distinct_Aggregates=T
  180. Distinct_Aggr_In_Case=F
  181. Group_By_Alias=T
  182. Group_By_Expr=T
  183. Group_By_Ordinal=T
  184. Group_By_Sorted=F
  185. Is_Null_Value_Expr=T
  186. Is_Null_Value_Parm=T
  187. Like_Value_Expr=T
  188. Multiple_Distinct=T
  189. Nested_Case=T
  190. ; Null=T
  191. Not_In_Subquery=T
  192. Nulls_Sort_Last=F
  193. Order_By_Alias=F
  194. ;Union requires order by ordinal
  195. Order_By_Name=F
  196. Substring_On_Expr=T
  197. Subqueries=T
  198. Subquery_Column_Alias=T
  199. Subquery_In_Case=F
  200. Olap_Distinct=F
  201. Olap_Null_Order=F
  202. Distinct_To_GroupBy=F
  203. Parameter_In_Select_List=F
  204. Expression_In_In=F
  205. [Exceptions General DATABASE:TERADATA VERSION:12.00]
  206. Distinct_To_GroupBy=T
  207. [Exceptions Joins]
  208. Cross=T
  209. Cross_Syntax=" CROSS JOIN "
  210. Full_Non_Equi_Join=T
  211. Full_Outer=T
  212. Full_Post=""
  213. Full_Pre=""
  214. Full_Syntax=" FULL OUTER JOIN "
  215. Inner=T
  216. Inner_Col_Post=""
  217. Inner_Col_Pre=""
  218. Inner_Syntax=" INNER JOIN "
  219. Inner_Tbl_Restrict=F
  220. Left_Eql=" LEFT OUTER JOIN "
  221. Left_Nested=T
  222. Left_Outer=T
  223. Left_Post=""
  224. Left_Pre=""
  225. Nested_Outer=T
  226. Non_Equi_Joins=T
  227. On_Condition_Between_Predicate=T
  228. On_Condition_In_Predicate=T
  229. On_Condition_IsNull_Predicate=T
  230. On_Condition_Like_Predicate=T
  231. On_Condition_Not_Predicate=T
  232. On_Condition_Or_Predicate=T
  233. On_Condition_Set_Functions=F
  234. On_Condition_Subqueries=T
  235. One_Outer=F
  236. Optnl_Tbl_Filter=T
  237. Optnl_Tbl_Join_Filter=T
  238. Optnl_Tbl_Join_Restrict=F
  239. Outer_Tbl_List=F
  240. Optnl_Tbl_Restrict=F
  241. Outer_Syntax=T
  242. Right_Eql=" RIGHT OUTER JOIN "
  243. Right_Nested=T
  244. Right_Outer=T
  245. Right_Post=""
  246. Right_Pre=""
  247. [Exceptions Literals]
  248. Alt_Date_Literal_Assignment=F
  249. Alt_Date_Literal_Between=F
  250. Alt_Date_Literal_Comparison=F
  251. Alt_Date_Literal_In=F
  252. Alt_Date_Literal_Insert_Value=F
  253. Alt_Date_Literal_Str=
  254. Alt_Interval_Literal_Str=
  255. Alt_Time_Literal_Str=
  256. Alt_Timestamp_Literal_Str=
  257. Boolean_Literal=F
  258. Date_Add_Function_Str=
  259. Date_Format_Str="YYYY MM DD"
  260. Date_Literal=C
  261. Date_Literal_Str="DATE '%s-%s-%s'"
  262. Date_Sub_Function_Str=
  263. False_Literal_Str=
  264. Interval_Format_Str="DDDD HH MM SS FFFFFF"
  265. Interval_Literal=T
  266. Interval_Literal_Str=
  267. IntervalYM_Format_Str="YYYY MM"
  268. IntervalYM_Literal=T
  269. IntervalYM_Literal_Str=
  270. Interval_Sign_Before_Quote=T
  271. Time_Format_Str="HH MM SS FFFFFF"
  272. Time_Literal=C
  273. Time_Literal_Str="TIME '%s:%s:%s.%s'"
  274. TimeTZ_Format_Str=
  275. TimeTZ_Literal=F
  276. TimeTZ_Literal_Str=
  277. Timestamp_Format_Str="YYYY MM DD HH MM SS FFFFFF"
  278. Timestamp_Literal=C
  279. Timestamp_Literal_Str="TIMESTAMP '%s-%s-%s %s:%s:%s.%s'"
  280. TimestampTZ_Format_Str=
  281. TimestampTZ_Literal=F
  282. TimestampTZ_Literal_Str=
  283. True_Literal_Str=
  284. Unknown_Literal_Str=
  285. Zero_Date_Literal_Str=
  286. Zero_Timestamp_Literal_Str=
  287. NChar_Literal=T
  288. [Exceptions Misc]
  289. Case_Parentheses=T
  290. [Exceptions Operators]
  291. Add="+"
  292. And="and"
  293. Div="/"
  294. Eql="="
  295. Geq=">="
  296. Grt=">"
  297. Leq="<="
  298. Les="<"
  299. Mul="*"
  300. ;Neg="-"
  301. Neq="<>"
  302. Not="not"
  303. Or="or"
  304. Sub="-"
  305. [Exceptions Predicates]
  306. All="all"
  307. [Exceptions Separators]
  308. Catalog_Separator="."
  309. Schema_Separator="."
  310. Table_Separator="."
  311. [Exceptions Set Operators]
  312. Distinct="distinct"
  313. Except=" except "
  314. Except_All=T
  315. Intersect="intersect"
  316. Intersect_All=T
  317. ;Order_By=
  318. Union="union"
  319. Union_All=T
  320. [Exceptions Tables]
  321. Joined=T
  322. Derived=T
  323. UniqueName_Prefix="coguda"
  324. [Exceptions Value Expressions]
  325. Case=T
  326. Cast=T
  327. Coalesce=T
  328. Extract=T
  329. Octet_Length=T
  330. Nullif=C
  331. Substring=T
  332. Upper=T
  333. StrCat=T
  334. Char_Length=T
  335. Position=C
  336. Current_Date=T
  337. Current_Time=F
  338. Current_Timestamp=F
  339. LocalTime=C
  340. LocalTimestamp=C
  341. Abs=T
  342. Exp=T
  343. Ln=T
  344. Mod=T
  345. Power=C
  346. Sqrt=T
  347. Ceiling=F
  348. Lower=T
  349. Floor=F
  350. Trim=T
  351. [Exceptions Blob Expressions]
  352. Blob_In_Substring=T
  353. Blob_In_Trim=T
  354. Blob_In_StrCat=T
  355. [Operator Addition]
  356. Date=
  357. Time=
  358. Timestamp=
  359. Interval=
  360. [Operator Subtraction]
  361. Date=
  362. Time=
  363. Timestamp=
  364. Interval=
  365. [Operator Comparison]
  366. NV=CH,OK:NC,OK:VC,OK
  367. NC=NV,OK:CH,OK:VC,OK
  368. VC=NV,OK:NC,OK
  369. CH=NV,OK:NC,OK
  370. [Misc]
  371. ; Default processing mode.
  372. Processing Mode=Database Only
  373. ;Use the wild card (i.e. %) as the table name to retrieve all the schemas.
  374. Wild_Card_As_Tablename=
  375. ; Row Limit in Teradata is achieved by adding
  376. ; the following line:
  377. ; TOP n
  378. ; Right after the first SELECT or SELECT DISTINCT
  379. ;
  380. [Directives Session]
  381. Query_Row_Limit_Pos=Append_Distinct
  382. Query_Row_Limit_Text=" TOP %d "
  383. ;
  384. ; Operations supported and results of the supported operation.
  385. ; The format is;
  386. ; [Operator <operator name>]
  387. ; <LHS>=<RHS>,<RES>{:<RHS>,<RES>}
  388. ;
  389. ; where
  390. ;
  391. ; LHS = data type of left hand side of operation
  392. ; RHS = data type of right hand side of operation
  393. ; RES = result data type of operation
  394. ;
  395. ; LHS, RHS and RES values may be one of:
  396. ;
  397. ; Name Abbreviation DMS Data Type
  398. ; CHAR CH sqlChar
  399. ; VARCHAR VC sqlVarChar
  400. ; LVARCHAR LC sqlLongVarChar
  401. ; NCHAR NC sqlNChar
  402. ; NVARCHAR NV sqlNVarChar
  403. ; BINARY BN sqlBinary
  404. ; VARBINARY VB sqlVarBinary
  405. ; BOOLEAN BO sqlBoolean
  406. ; SMALLINT SM sqlSmallInt
  407. ; INTEGER IT sqlInteger
  408. ; QUAD QD sqlQuad
  409. ; DECIMAL DM sqlDecimal
  410. ; NUMERIC NU sqlNumeric
  411. ; FLOAT FL sqlFloat
  412. ; DOUBLE DB sqlDouble
  413. ; DATE DT sqlDate
  414. ; TIME TM sqlTime
  415. ; TIMESTAMP TS sqlDateTime
  416. ; INTERVAL IV sqlInterval
  417. ; TIME_TZ TT sqlTimeTZ
  418. ; TIMESTAMP_TZ TZ sqlTimestampTZ
  419. ; INTERVAL_YM IY sqlIntervalYM
  420. ; ALL DATATYPES AD -------------
  421. ; ---- NA sqlUnknownType
  422. ;
  423. [Operator Cast DATABASE:TERADATA]
  424. AD=AD,AD
  425. AD=TT,NA:TZ,NA
  426. TM=TM,NA
  427. TS=TM,NA
  428. TT=TM,NA
  429. TZ=TS,NA
  430. DB=IV,NA:IY,NA
  431. FL=IV,NA:IY,NA
  432. [DATABASE:TERADATA VERSION:16]
  433. ;This section is used by Teradata ANSI ODBC driver on Unix
  434. ;for IANNAAppCodePage that is specified in the odbc.ini file.
  435. [I18N Encoding Mapping DATABASE:TERADATA]
  436. ;ascii
  437. 3=US-ASCII
  438. ;No euro updates
  439. 4=iso-8859-1
  440. ;Central Europe
  441. 5=iso-8859-2
  442. ;Maltese Esperanto
  443. 6=iso-8859-3
  444. ;Baltic
  445. 7=iso-8859-4
  446. ;Cyrillic
  447. 8=iso-8859-5
  448. ;Arabic
  449. 9=iso-8859-6
  450. ;ISO Greek (w/o euro update)
  451. 10=iso-8859-7
  452. ;hebrew
  453. 11=iso-8859-8
  454. ;Turkish
  455. 12=iso-8859-9
  456. ;UTF-8
  457. 106=utf-8
  458. ;Latin9, with Euro updates
  459. 111=iso-8859-15
  460. ;Japanese MS_Kanji
  461. 17=Shift_JIS
  462. ;Korean, same as cp1363
  463. 36=korean
  464. ;HP Latin1
  465. 2004=roman8
  466. ;PRC Chinese
  467. 2025=GB2312
  468. 114=gb18030
  469. ;Taiwan Chinese
  470. 2026=Big5
  471. ;EBCDIC Germany
  472. 2030=CP273
  473. ;windows-1252
  474. 2252=cp1252
  475. ;Thai Industry Standard Institute
  476. 2259=TIS-620
  477. ;
  478. ;The following is the standard way to retrieve the database character set when establishing connections to Teradata.
  479. ;The character set information is used for some useful optimizations.
  480. ;If the character set is not known, the product will still work fine, thus the statement can be commented out.
  481. ;The statement could be replaced with one that gives the same answers. If the string "%s" is present, it will be replaced with the user name before execution.
  482. ;If the replacement statement throws an error, the error will be returned to the user and the connection will fail.
  483. ;If the replacement statement returns no rows, this is interpreted as unknown character set, and no error is returned to the user.
  484. ;
  485. [DATABASE:TERADATA]
  486. ;line below is to read subsections [DATABASE:TERADATA], and [DATABASE:TERADATA VERSION:16.20]
  487. DBINFO_SUBSECTIONS="DBNAM,DBMIN"
  488. Interval Workaround="T"
  489. SupportUnicode="T"
  490. CHARACTER_SET_SQL="SELECT CurrentCollation, LogonSource FROM DBC.SessionInfoX WHERE SessionNo = SESSION AND UserName = '%s' ORDER BY LogonSequenceNo desc, LogonDate desc, LogonTime desc"
  491. ; This entry is used to specify whether the prepared statement will be closed
  492. ; when reaching the end of data, the connection occupied can be used by other
  493. ; statement.
  494. CLOSE_HSTMT_AT_EOD="T"
  495. ; When set to T, the sub connections held by the request will be free when release request.
  496. RELEASE_SUBCONNECTION="T"
  497. ;Teradata supports only one asynchronous active statement per connection
  498. SQL_MAX_CONCURRENT_ACTIVITIES="1"
  499. ;When set to T, disable the command "Help Column", and disable the command to get the database collation.
  500. disable_Help_Column = "F"
  501. ;If plus sign appears in the numeric string,
  502. ;[Teradata][ODBC Teradata Driver] Numeric value out of range
  503. Unsigned Positive Numbers="T"
  504. [DRIVER:TDATAODBC_SB32.DLL]
  505. ;select 1 from T where QC_INTEGER = cast(? as integer)
  506. ;[Teradata][ODBC Teradata Driver] (80) The database cannot determine the type and size of parameter, returning 0.
  507. ;RECJ6ZHU7
  508. SQL_API_SQLDESCRIBEPARAM="FALSE"
  509. [DRIVER:TDATAODBC_SB32.SO]
  510. SQL_API_SQLDESCRIBEPARAM="FALSE"
  511. [DRIVER:TDATAODBC_SB64.DLL]
  512. SQL_API_SQLDESCRIBEPARAM="FALSE"
  513. [DRIVER:TDATAODBC_SB64.SO]
  514. SQL_API_SQLDESCRIBEPARAM="FALSE"
  515. [DRIVER:TDATA32.DLL]
  516. SQL_API_SQLDESCRIBEPARAM="FALSE"
  517. [DRIVER:TDATA.SO]
  518. SQL_API_SQLDESCRIBEPARAM="FALSE"