123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887 |
- ;***********************************************************************
- ;Licensed Materials - Property of IBM
- ;
- ;BI and PM: UDA
- ;
- ;(C) Copyright IBM Corp. 2005, 2018
- ;
- ;U.S. Government Users Restricted Rights - Use, duplication, or disclosure
- ;by GSA ADP Schedule Contract with IBM Corp.
- ;
- ;Unless specifically authorized by IBM, you may not modify any part of this
- ;file. Where modification is authorized, you must reproduce any copyright
- ;notices contained in this file and specifically identify which
- ;modifications have been made by your organization. YOU ARE SOLELY
- ;RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF ANY MODIFICATIONS TO
- ;THIS FILE AND ASSUME ALL RISKS ASSOCIATED WITH THE USE AND DISTRIBUTION
- ;OF THE MODIFIED FILE. IBM will not provide support relating to
- ;unauthorized changes you make to this file.
- ;***********************************************************************
- ; $Header: //uda/main/prod/dmd/sgi/ctlib/cogdmct.ini#5 $
- ;
- ; Module:
- ; cogdmsct.ini
- ;
- ; This file provides all database information required by the
- ; SQL to SQL translator and the RDS component of DMS.
- ;
- ; ***************************************************************************
- ;
- ; List of expression results. For now, just do addition.
- ; The differences in the tables will arise from date subtraction,
- ; and date multiplication and division which do not make sense!
- ;
- [Expression Results]
- ;
- ; * Small Integer
- ;
- sqlSmallInt,+,sqlSmallInt=sqlInteger
- sqlSmallInt,+,sqlInteger=sqlInteger
- sqlSmallInt,+,sqlDecimal=sqlDecimal
- sqlSmallInt,+,sqlFloat=sqlFloat
- sqlSmallInt,+,sqlDouble=sqlDouble
- sqlSmallInt,+,sqlQuad=sqlQuad
- sqlSmallInt,+,sqlDateTime=sqlDateTime
- ;
- ; * Integer
- ;
- sqlInteger,+,sqlSmallInt=sqlInteger
- sqlInteger,+,sqlInteger=sqlInteger
- sqlInteger,+,sqlDecimal=sqlDecimal
- sqlInteger,+,sqlFloat=sqlFloat
- sqlInteger,+,sqlDouble=sqlDouble
- sqlInteger,+,sqlQuad=sqlQuad
- sqlInteger,+,sqlDateTime=sqlDateTime
- ;
- ; * Decimal
- ;
- sqlDecimal,+,sqlSmallInt=sqlDecimal
- sqlDecimal,+,sqlInteger=sqlDecimal
- sqlDecimal,+,sqlDecimal=sqlDecimal
- sqlDecimal,+,sqlFloat=sqlFloat
- sqlDecimal,+,sqlDouble=sqlDouble
- sqlDecimal,+,sqlQuad=sqlDecimal
- sqlDecimal,+,sqlDateTime=sqlDateTime
- ;
- ; * Float
- ;
- sqlFloat,+,sqlSmallInt=sqlFloat
- sqlFloat,+,sqlInteger=sqlFloat
- sqlFloat,+,sqlDecimal=sqlFloat
- sqlFloat,+,sqlFloat=sqlFloat
- sqlFloat,+,sqlDouble=sqlDouble
- sqlFloat,+,sqlQuad=sqlDouble
- sqlFloat,+,sqlDateTime=sqlDateTime
- ;
- ; * Double
- ;
- sqlDouble,+,sqlSmallInt=sqlDouble
- sqlDouble,+,sqlInteger=sqlDouble
- sqlDouble,+,sqlDecimal=sqlDouble
- sqlDouble,+,sqlFloat=sqlDouble
- sqlDouble,+,sqlDouble=sqlDouble
- sqlDouble,+,sqlQuad=sqlDouble
- sqlDouble,+,sqlDateTime=sqlDateTime
- ;
- ; * Quad
- ;
- sqlQuad,+,sqlSmallInt=sqlQuad
- sqlQuad,+,sqlInteger=sqlQuad
- sqlQuad,+,sqlDecimal=sqlQuad
- sqlQuad,+,sqlFloat=sqlDouble
- sqlQuad,+,sqlDouble=sqlDouble
- sqlQuad,+,sqlQuad=sqlQuad
- sqlQuad,+,sqlDateTime=sqlDateTime
- ;
- ; * Date/time
- ;
- sqlDateTime,+,sqlSmallInt=sqlDateTime
- sqlDateTime,+,sqlInteger=sqlDateTime
- sqlDateTime,+,sqlDecimal=sqlDateTime
- sqlDateTime,+,sqlFloat=sqlDateTime
- sqlDateTime,+,sqlDouble=sqlDateTime
- sqlDateTime,+,sqlQuad=sqlDateTime
- ;
- ; Operations supported and results of the supported operation.
- ; The format is;
- ; [Operator <operator name>]
- ; <LHS>=<RHS>,<RES>{;<RHS>,<RES>}
- ;
- ; where
- ;
- ; LHS = data type of left hand side of operation
- ; RHS = data type of right hand side of operation
- ; RES = result data type of operation
- ;
- ; LHS, RHS and RES values may be one of:
- ;
- ; Name Abbreviation DMS Data Type
- ; CHAR CH sqlChar
- ; VARCHAR VC sqlVarChar
- ; LVARCHAR LC sqlLongVarChar
- ; BINARY BN sqlBinary
- ; VARBINARY VB sqlVarBinary
- ; SMALLINT SM sqlSmallInt
- ; INTEGER IT sqlInteger
- ; QUAD QD sqlQuad
- ; DECIMAL DM sqlDecimal
- ; FLOAT FL sqlFloat
- ; DOUBLE DB sqlDouble
- ; DATE DT sqlDate
- ; TIME TM sqlTime
- ; TIMESTAMP TS sqlDateTime
- ; INTERVAL IV sqlInterval
- ; ---- NA sqlUnknownType
- ;
- [Operator Addition]
- Date=
- Time=
- Timestamp=
- Interval=
- [Operator Subtraction]
- Date=
- Time=
- Timestamp=
- Interval=
- [Operator Comparison]
- Date=DT,OK:TS,OK
- Timestamp=DT,OK:TS,OK
- [Operator Cast]
- NA=AD,NA
- AD=VC,NA:NC,NA:NV,NA:TT,NA:TZ,NA:IV,NA:IY,NA
- TM=TS,NA
- ;
- ; There are no exceptions to the command strings.
- ;
- [Exceptions Commands]
- Select_Star=T
- [Exceptions Clauses]
- [Exceptions Tables]
- Simple=T
- Derived=T
- Joined=T
- UniqueName_Prefix="coguda"
- ; Maximum length of aliases.
- ; Even though Sybase 15 has increased the size of
- ; identifier to 255 from 30, we can not set it because
- ; our interface to Sybase is set to use 12.5.
- ; It is set to 28 to include the delimited character.
- SQL_MAX_TABLE_NAME_LEN="28"
- [Exceptions Tables Version:15.7]
- ; Even though Sybase 12.5 supports use of derived table,
- ; but it has a hard limit of 14 internal work(temp) table
- ; to be used to store temp result, this seriously limit
- ; the usage of derived table, and since RDS's sql group transformation
- ; generates a separate derived table for each distinct OLAP function
- ; with distinct FOR clause, so even now the OLAP functions can
- ; be pushed down, but it will fail on the server side anyway.
- ;
- ; Although in ASE 15 Sybase increase the internal work(temp) table
- ; from 14 to 46, is still a limitation for UDA.
- ;
- ; Cognos asked Sybase for removal of the limit and as a result
- ; Sybase has created CR 439945: "Enhancement request to remove
- ; the limit number of work table for derived tables".
- ; Until CR 439945 is implemented by Sybase, the "Derived" entry is still set to False.
- ;
- Derived=F
- Joined=F
- [Exceptions Joins]
- Inner=T
- Inner_Syntax=" INNER JOIN "
- Inner_Tbl_Restrict=F
- Left_Eql=" LEFT OUTER JOIN "
- Non_Equi_Joins=T
- Non_Join_Expr=T
- Non_Join_Non_Equi_Expr=T
- On_Condition_Subqueries=T
- Optnl_Tbl_Filter=T
- Optnl_Tbl_Join_Restrict=F
- Optnl_Tbl_Restrict=F
- Outer_Syntax=T
- Prsrv_Tbl_Filter=T
- Prsrv_Tbl_Join_Filter=T
- Right_Eql=" RIGHT OUTER JOIN "
- Cross=
- Left_Outer=T
- Right_Outer=T
- Full_Outer=
- Nested_Outer=T
- Outer_Tbl_List=F
- Left_Pre=""
- Left_Post=""
- Right_Pre=""
- Right_Post=""
- Left_Nested=T
- Right_Nested=T
- Two_Sided_Join_Restrict=F
- Optnl_Tbl_Join_Filter=T
- Full_Non_Equi_Join=F
- On_Condition_Set_Functions=F
- On_Condition_Not_Predicate=T
- On_Condition_In_Predicate=T
- On_Condition_Between_Predicate=T
- On_Condition_Like_Predicate=T
- On_Condition_IsNull_Predicate=T
- On_Condition_Or_Predicate=T
- Full_Syntax=
- Cross_Syntax=
- Union_Syntax=
- Natural_Syntax=
- Full_Pre=
- Full_Post=
- ;
- ; Sybase does not support 'match' or 'overlaps'
- ;
- [Exceptions Predicates]
- Match=
- Overlaps=
- [Exceptions Aggregates]
- Max="max"
- Min="min"
- Avg="avg"
- Sum="sum"
- Count="count"
- Count_Star="count(*)"
- [Exceptions Set Operators]
- Union_All=T
- Except=
- Intersect=
- Order_By_Limit="31"
- [Exceptions Operators]
- Neq="!="
- [Exceptions Value Expressions]
- Cast=T
- Case=T
- Coalesce=T
- Nullif=T
- Extract=C
- Position=C
- Char_Length=C
- Octet_length=C
- Bit_Length=F
- Substring=C
- Upper=T
- Lower=T
- Strcat=C
- Abs=T
- Mod=C
- Ln=C
- Exp=T
- Power=T
- Sqrt=T
- Floor=T
- Ceiling=T
- Trim=F
- Trim_Both_Spaces=C
- Trim_Leading_Spaces=C
- Trim_Trailing_Spaces=C
- [Exceptions Blob Expressions]
- Blob_In_Substring=F
- Blob_In_StrCat=F
- Blob_In_IsNull=F
- ;
- ; Extract=C, above, indicates that SQL'92 EXTRACT functionality is [partially]
- ; supported by the Sybase Gateway through the use of the following function maps.
- ;
- ; EXTRACT( YEAR FROM <dateColumn> )' maps to coguda#extract_year( <dateexpr> ).
- ;
- Extract_Year=coguda#extract_year
- Extract_Month=coguda#extract_month
- Extract_Day=coguda#extract_day
- Extract_Hours=coguda#extract_hour
- Extract_Minutes=coguda#extract_minute
- Extract_Seconds=coguda#extract_second
- [Exceptions Value Expressions Version:11.0]
- Cast=F
- Case=F
- Coalesce=F
- Nullif=F
- Extract=F
- [Exceptions General]
- Nulls_Sort_Last=F
- Group_By_Expr=T
- Multiple_Distinct=T
- Subquery_Column_Alias=F
- Count_Non_Distinct=T
- Count_Value_Expr=T
- Count_Literal=T
- Count_Blob=F
- Like_Value_Expr=T
- Is_Null_Value_Expr=T
- Is_Null_Value_Parm=F
- Subquery_In_Group_By=F
- Subquery_In_Case=T
- Subqueries=T
- Like_With_Escape=T
- Current_Date=C
- Current_Time=F
- Current_Timestamp=F
- Localtime=C
- Localtimestamp=C
- Boolean_Comparison=F
- Parameter_In_Select_List=F
- Parameter_In_Having=F
- ;
- ; We have problems with subqueries in version 11.0 and 11.5 in a variety of
- ; scenarios, enough that we cannot identify specific conditions in which
- ; we can and cannot safely push subqueries to SQL Server.
- ;
- [Exceptions General Version:11.0]
- Subqueries=F
- Correlated_Subqueries=F
- ; refer trakker 233108
- Subquery_In_Case=F
- Localtime=F
- [Exceptions General Version:11.5.0]
- Subqueries=F
- Correlated_Subqueries=F
- ; refer trakker 233108
- Subquery_In_Case=F
- Localtime=F
- [Exceptions General Version:11.9.1]
- Correlated_Subqueries=F
- Subqueries=F
- ; refer trakker 233108
- Subquery_In_Case=F
- Localtime=F
- ;
- ; Commented down below entry because the problem is fixed in 11.9.2 EBF 8891.
- ; The Sybase bug number that causes the problem is 203089: A 'Group By' query
- ; with an 'IN' list and an 'ISNULL' clause within a 'Case' expression returns
- ; results as a Cartesian product. Trakker number is 266806.
- [Exceptions General Version:11.9.2]
- ;Group_By_Expr=F
- ; refer trakker 233108
- Subquery_In_Case=F
- [Exceptions General Version:12.0.0]
- Localtime=F
- [Exceptions General Version:12.5.0]
- Localtime=F
- [Exceptions Literals]
- Alt_Timestamp_Literal_Str="'%s-%s-%s %s:%s:%s.%-.3s'"
- Alt_Date_Literal_Assignment=T
- Alt_Date_Literal_Between=T
- Alt_Date_Literal_Comparison=T
- Alt_Date_Literal_In=T
- Alt_Date_Literal_Insert_Value=T
- ;
- Date_Literal=C
- Date_Format_Str="YYYY MM DD"
- Date_Literal_Str="convert(date,'%s-%s-%s')"
- Date_Add_Function_Str="dateadd(day,?2,?1)"
- Date_Sub_Function_Str="datediff(day,?2,?1)"
- ;
- Interval_Literal=F
- IntervalYM_Literal=F
- ;
- Time_Literal=C
- Time_Format_Str="HH MM SS FFF"
- Time_Literal_Str="convert(time,'%s:%s:%s.%-.3s')"
- ;
- TimeTZ_Literal=F
- TimeTZ_Format_Str=
- TimeTZ_Literal_Str=
- ;
- Timestamp_Literal=C
- Timestamp_Format_Str="YYYY MM DD HH MM SS FFF"
- Timestamp_Literal_Str="convert(datetime,'%s-%s-%s %s:%s:%s.%-.3s')"
- ;
- TimestampTZ_Literal=F
- TimestampTZ_Format_Str=
- TimestampTZ_Literal_Str=
- ;
- NChar_Literal=F
- ;
- Boolean_Literal=F
- True_Literal_Str=
- False_Literal_Str=
- Unknown_Literal_Str=
- ; The datetime datatype for Sybase ASE has a range starting at
- ; January 1, 1753 and ending at December 31, 9999.
- Timestamp_Range_Start="1753-01-01"
- Timestamp_Range_End="9999-12-31"
- [Exceptions Literals Version:12.0.0]
- Date_Literal_Str="convert(datetime,'%s-%s-%s')"
- Time_Literal=F
- [Exceptions Literals Version:12.5.0]
- Date_Literal_Str="convert(datetime,'%s-%s-%s')"
- Time_Literal=F
- [Exceptions Delimiters]
- ;
- ; Specifies the delimiter character for each name part.
- ;
- ; If a delimiter is set to nothing, then the database does not support the
- ; delimiting of that name part; otherwise, the specified string is used to
- ; delimit the corresponding name part.
- ;
- ; NOTE: if Wholename specified and not empty then this indicates that fully
- ; qualified names are delimited with this character;
- ; For example,
- ; "myCatalog.mySchema.myTable.myColumn"
- ;
- ; NOTE: for a double quote (") entry, specifies "\"".
- ;
- Catalog_Delimiter=
- Schema_Delimiter=
- Table_Delimiter="\""
- Column_Delimiter="\""
- Procedure_Delimiter=
- Wholename_Delimiter=
- [Exceptions Separators]
- ;
- ; Specifies the name separator that follows the type of name.
- ; [<catalog><catalogSeparator>][<schema><schemaSeparator>][<table><tableSeparator>][<column>]
- ; [<catalog><catalogSeparator>][<schema><schemaSeparator>][<procedure>]
- ;
- Catalog_Separator="."
- Schema_Separator="."
- Table_Separator="."
- [Exceptions Misc]
- Session_Sort_Order=T
- ;
- ; System 10 functions equivalent to EE functions
- ;
- ; Several functions are supported by System 10 but do
- ; not match the EE functions closely enough to be
- ; used as substitutes:
- ;
- ; ascii (the convert function requires a size specification)
- ; index (patindex) (patindex requires % characters around string)
- ;
- [Builtin Functions]
- n:cast_float(%1bcdints)=convert(float(48),%1);
- n:cast_real(%1bcdints)=convert(real,%1);
- ;
- ; mapping cast_decimal to convert(decimal(31, 16),%1) is a KLUDGE for
- ; fixing trakker 229629 (incorrect results for division expression)
- ; temporarily. The bug should be fixed in translator
- ; to allow precision and scale to be passed to cast_decimal.
- ;
- n:cast_decimal(%1bcdints)=convert(decimal(31, 16),%1);
- n:cast_integer(%1bcdints)=convert(integer,%1);
- n:cast_smallint(%1bcdints)=convert(smallint,%1);
- s:cast_timestamp(%1bcdints)=convert(datetime,%1);
- c:cast_char(%1bcdints)=convert(char,%1);
- c:cast_varchar(%1bcdints)=convert(varchar,%1);
- n:octet_length(%1cx)=datalength(%1);
- n:position(%1c,%2c)=charindex(%1,%2);
- c:substring(%1c,%2n,%3n)=substring(%1,%2,%3);
- c:substring(%1c,%2n)=substring(%1,%2,char_length(%1));
- ;c:substring(%1x,%2n,%3n)=substring( convert(varchar(16384),%1),%2,%3 );
- c:coguda#concat(%1c,%2c)=%1 + %2;
- c:coguda#concat(%1bdints,%2bdints)=%1 + %2;
- ;c:coguda#concat(%1x,%2c)=convert( VARCHAR(16384),%1 ) + %2;
- ;c:coguda#concat(%1c,%2x)=%1 + convert( VARCHAR(16384),%2 );
- ;c:coguda#concat(%1x,%2x)= convert( VARCHAR(16384),%1 ) + convert( VARCHAR(16384),%2 );
- n:mod(%1n,%2n)=( (%1) % (%2) );
- n:ln(%1n)=LOG(%1);
- n:char_length(%1cx)=char_length(%1);
- d:current_date()=current_date();
- t:localtime()=current_time();
- s:localtimestamp({%1n})=getdate();
- n:absolute(%1n)=abs(%1);
- n:ceiling(%1n)=ceiling(%1);
- c:concat(%1c,%2c)=%1 + %2;
- c:downshift(%1c)=lower(%1);
- n:floor(%1n)=floor(%1);
- n:index(%1c,%2c)=charindex(%2,%1);
- c:leftjustify(%1c)=ltrim(%1);
- n:position(%1c,%2c)=charindex(%1,%2);
- n:power(%1n,%2n)=power(%1,%2);
- c:reverse(%1c)=reverse(%1);
- n:size(%1c)=datalength(%1);
- c:truncate(%1c)=rtrim(%1);
- c:upshift(%1c)=upper(%1);
- n:round(%1n,%2n)=round(%1, %2);
- n:ascii(%1c)=ascii(%1);
- ;
- ; Business Functions for Date Calculations
- ;
- d:_add_days(%1d,%2n)=DATEADD( DAY, %2, %1 );
- s:_add_days(%1s,%2n)=DATEADD( DAY, %2, %1 );
- d:_add_months(%1d,%2n)=DATEADD( MONTH, %2, %1 );
- s:_add_months(%1s,%2n)=DATEADD( MONTH, %2, %1 );
- d:_add_years(%1d,%2n)=DATEADD( YEAR, %2, %1 );
- s:_add_years(%1s,%2n)=DATEADD( YEAR, %2, %1 );
- n:_days_between(%1ds,%2ds)=DATEDIFF( DAY, %2, %1 );
- n:_months_between(%1ds,%2ds)=DATEDIFF( MONTH, %2, %1 );
- n:_years_between(%1ds,%2ds)=DATEDIFF( YEAR, %2, %1 );
- n:_days_to_end_of_month(%1ds)=DATEDIFF( DAY, %1, DATEADD( DAY, -1, DATEADD( MONTH, 1, DATEADD( DAY, 1 - DATEPART( DAY, %1 ), %1 ) ) ) );
- n:_age(%1ds)=;
- d:_first_of_month(%1d)=DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 );
- s:_first_of_month(%1s)=DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 );
- d:_last_of_month(%1d)=DATEADD( DAY, -1, DATEADD( MONTH, 1, DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 ) ) );
- s:_last_of_month(%1s)=DATEADD( DAY, -1, DATEADD( MONTH, 1, DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 ) ) );
- s:_make_timestamp(%1n,%2n,%3n)=CONVERT( DATETIME, CONVERT( VARCHAR(8), ( %1 * 10000 ) + ( %2 * 100 ) + %3 ) );
- n:_ymdint_between(%1ds,%2ds)=;
- n:_day_of_year(%1ds)=DATEPART( DAYOFYEAR, %1 );
- n:_week_of_year(%1ds)=DATEPART( CALWEEKOFYEAR, %1 );
- n:_day_of_week(%1ds, %2n)=(( ( DATEPART( WEEKDAY, %1 ) + 5 ) % 7 - %2 + 8 ) % 7 + 1);
- n:_round(%1n,%2n)=ROUND(%1, %2);
- ;
- ; Additional Business Functions for Date Calculations
- ;
- s:_add_hours(%1s,%2n)=DATEADD( HOUR, %2, %1 );
- t:_add_hours(%1t,%2n)=DATEADD( HOUR, %2, %1 );
- s:_add_minutes(%1s,%2n)=DATEADD( MINUTE, %2, %1 );
- t:_add_minutes(%1t,%2n)=DATEADD( MINUTE, %2, %1 );
- s:_add_seconds(%1s,%2n)=DATEADD( SECOND, %2, %1 );
- t:_add_seconds(%1t,%2n)=DATEADD( SECOND, %2, %1 );
- n:_hours_between(%1ds,%2ds)=DATEDIFF( HOUR, %2, %1 );
- n:_minutes_between(%1ds,%2ds)=DATEDIFF( MINUTE, %2, %1 );
- n:_seconds_between(%1ds,%2ds)=DATEDIFF( SECOND, %2, %1 );
- ;
- ; Functions required by EXTRACT.
- ;
- n:coguda#extract_year(%1ds)=DATEPART(YEAR, %1);
- n:coguda#extract_month(%1ds)=DATEPART(MONTH, %1);
- n:coguda#extract_day(%1ds)=DATEPART(DAY, %1);
- n:coguda#extract_hour(%1dst)=DATEPART(HOUR, %1);
- n:coguda#extract_minute(%1dst)=DATEPART(MINUTE, %1);
- ; Case 11139380 (CR 391255)
- ; For TIME columns that are NULLABLE, using the DATEPART function with the SECOND and
- ; MILLISECOND option returns incorrect data
- n:coguda#extract_second(%1ds)=DATEPART(SECOND, %1) + convert( decimal, DATEPART(MILLISECOND, %1)) / 1000;
- ;CAST functions
- ; for timestamp we need to change it to DATETIME
- s:coguda#cast_timestamp(%1cnds)=CAST( %1 AS DATETIME );
- [Builtin Functions Version:12.5.0]
- d:current_date()=convert(datetime, convert( char(8), getdate(), 112 ), 112);
- [Builtin Functions Version:12.0.0]
- d:current_date()=convert(datetime, convert( char(8), getdate(), 112 ), 112);
- [Builtin Functions Version:11.9.2]
- d:current_date()=convert(datetime, convert( char(8), getdate(), 112 ), 112);
- [Database Functions]
- ;
- ; Character
- ;
- n:sy_ascii(%1c)=ascii(%1);
- c:sy_char(%1n)=char(%1);
- n:sy_char_length(%1c)=char_length(%1);
- c:sy_right(%1c,%2n)=right(%1,%2);
- c:sy_soundex(%1c)=soundex(%1);
- cx:trim_leading_spaces(%1cx)=LTRIM(%1);
- cx:trim_trailing_spaces(%1cx)=RTRIM(%1);
- cx:trim_both_spaces(%1cx)=LTRIM(RTRIM(%1));
- ;
- ; Numeric
- ;
- n:sy_rand(%1n)=rand(%1);
- n:sy_round(%1n,%2n)=round(%1,%2);
- ;
- ; Conversion
- ;
- ; SQL Server supports several type conversions. The ones listed
- ; below are the ones we are interested in:
- ;
- ; - number to char
- ; - datetime to char
- ;
- ; - char to number
- ;
- ; - char to datetime
- ; - number to datetime
- ;
- bcdints:convert(%1bcdints,%2bcxdints {,%3n})=convert(%1,%2 {,%3});
- ;
- ; System functions
- ;
- c:sy_user()=user;
- ;
- ; This section currently unused
- ;
- [Database Specific Variables]
- @@char_convert=n
- @@client_csname=c
- @@client_csid=n
- @@connections=n
- @@cpu_busy=n
- @@error=n
- @@identity=n
- @@idle=n
- @@io_busy=n
- @@isolation=n
- @@langid=c
- @@language=c
- @@maxcharlen=n
- @@max_connections=n
- @@maxread=n
- @@maxwrite=n
- @@minwrite=n
- @@ncharsize=n
- @@nestlevel=n
- @@pack_receivea=n
- @@pack_senta=n
- @@packet_errorsa=n
- @@procid=n
- @@rowcounta=n
- @@servername=c
- @@spid=n
- @@sqlstatus=n
- @@textsize=n
- @@thresh_hysteresis=n
- @@timeticks=n
- @@total_errors=n
- @@total_read=n
- @@total_write=n
- @@tranchained=n
- @@trancount=n
- @@transtate=n
- @@version=t
- [Directives Session]
- ;
- ; By default SQL_ATTRIB_DB_DOP( Degree of Parallelism ) is 0.
- ; To disable parallel execution this attribute must be changed to
- ; Dop_Text="SET PARALLEL_DEGREE 1"
- ;
- Dop_Text="SET PARALLEL_DEGREE 0"
- Dop_Pos=
- ;
- ; By default SQL_ATTRIB_DB_JOIN_ORDER( table ordering ) is
- ; SQL_NO_JOIN_ORDER.
- ; To set to SQL_ORDERED_JOIN this attribute must be changed to
- ; Ordered_Text="SET FORCEPLAN ON"
- ;
- Ordered_Text="SET FORCEPLAN OFF"
- Ordered_Pos=
- ; Row Limit in Sybase ASE Server is achieved by adding
- ; the following line: TOP n right after the first SELECT or SELECT DISTINCT
- ;
- ; The Row Limit in Sybase ASE Server is
- ; supported from version 12.5.3 and up
- ;
- Query_Row_Limit_Pos=Append_Distinct
- Query_Row_Limit_Text=" TOP %d "
- [Directives Session Version:12.5.0]
- Query_Row_Limit_Pos=
- Query_Row_Limit_Text=
- [Directives Session Version:12.5.1]
- Query_Row_Limit_Pos=
- Query_Row_Limit_Text=
- [Directives Session Version:12.5.2]
- Query_Row_Limit_Pos=
- Query_Row_Limit_Text=
- [Misc]
- ;
- ; The entry 'Debug' indicates if debug is enabled or disabled. 0 indicates
- ; that CT-Library debug tracing is disabled. The following values may
- ; be added together to enable various levels of CT-Library debug tracing:
- ;
- ; 0 = disables all tracing
- ;
- ; 1 = prints function-level state transition information
- ;
- ; 2 = prints information each time an asynchronous operation begins or
- ; completes
- ;
- ; 4 = prints message text whenever a CT-Library or server message is
- ; generated
- ;
- ; 8 = prints trace information whenever a CT-Library error occurs
- ;
- ; 16 = prints memory management information
- ;
- ; 32 = prints CT-Library network interaction information
- ;
- ; 64 = prints CT-Library protocol-level state transition information
- ;
- ; For example, if to enable:
- ;
- ; - asynchronous information
- ; - CT-Library error trace information
- ; - protocol-level state transition information
- ;
- ; the value for 'Debug' would be:
- ;
- ; 2 + 8 + 64 = 74
- ;
- ; The 'Debug File' entry indicates to which file the CT-Library debug
- ; trace results should be written. If no name is supplied, the file
- ; ctdebug.log is created in the user's temporary directory (as indicated
- ; by the value of either the TMP or TMPDIR DOS environment variables).
- ;
- ; The name of the debug file may contain the strings TMP or TMPDIR in
- ; which case the value of the corresponding environment variable is
- ; substituted in the string supplied by the user.
- ;
- Debug=0
- Debug File=TMP\ctlib.log
- ;
- ; The entry 'Enable cancel' enables the use of asynchronous cancellations
- ; of the asynchronous opening of cursors. Previously, due to a bug in
- ; CT-Library, cancelling an asynchronous cursor open command would cause
- ; the application to hang. This bug has been fixed by Sybase. If this
- ; problem is encountered, this following setting should be set to '0'. The
- ; latest version of CT-Library should be obtained from Sybase to fix this
- ; problem.
- ;
- Enable cancel=1
- ;
- ; The entry 'Enable notify' enables the reception of asynchronous RPC
- ; notifications. Enabling notifications may cause an application
- ; to abort during the 'describe' operation. When this has been fixed in
- ; CT-Library. If the problem is encountered, set the 'Enable notify' item
- ; to '1'. Having this item set to '0' disables the reception of asynchronous
- ; notifications from an open server.
- ;
- Enable notify=0
- ;
- ; The entry 'Enable delimit' enables the support of delimited identifiers
- ; within SQL queries. Due to problems with Sybase System 10's handling
- ; of SQL queries with this option enabled, the default is to disable
- ; the use of delimited identifiers. If these problems are fixed, set
- ; the value of this flag to '1' to enable the use of delimited identifiers.
- ; NOTE: if this flag is set to '1', do not forget to change the entry
- ; under [Exceptions Delimiters] to "\" for the corresponding name part
- ;
- Enable delimit=0
- ;
- ; The entry 'Read Only Clause' is used to add an explicit 'for read only'
- ; clause to the end of all (non 'for update') select statements. CT-Library
- ; does not currently make cursors read-only without the explicit syntax
- ; added to the SQL statement. If this problem is fixed, then this value
- ; may be set to 0. Setting the value to 0 without this bug fixed will
- ; cause all select statements to be executed with a read/write cursor,
- ; possibly affecting performance, especially if a where clause references
- ; an indexed column.
- ;
- Read Only Clause=1
- ;
- ; The entry 'NUMOFROWS' is used to set the number of rows that the server
- ; returns to Client-Library per each internal fetch request.
- NUMOFROWS=20
- ;
- ; The entry 'Enable APICheck' enables CT-Library to perform argument
- ; and state checking for their routine.
- ; By default, we do not do API checking. With API checking disabled, CT-Library
- ; does not check for usage errors. Trakker 259102 is a usage error, where
- ; a stored procedure does not expect the right number of parameter. With API
- ; checking is disabled, user does not receive any error. However, when user
- ; tries to retrieve the result set, CT-Library GPF.
- ; Workaround for 259102, to set 'Enable APIChk' to 1.
- Enable APICheck=0
- ; Default processing mode.
- Processing Mode=Limited Local
- ; Sybase CTLIB does not have a definition for ASE's varchar datatype
- ; A field called usertype in CTLIB structure can be used to
- ; indicate that the datatype is ASE's varchar.
- ; However this 'usertype' can return incorrect or inaccurate information as
- ; describe in Sybase bug CR 431945:"When executing a SELECT statment via DYNAMIC SQL
- ; Adaptive Server could send incorrect or inaccurate information in the column format
- ; descriptions for the user type id field. As per Jan 2007, the bug is fixed
- ; in ASE 12.5.4 ESD 3 but not in ASE 15 and up
- ;
- ; For user who has a fix for Sybase bug CR 431945 and would like to have
- ; ASE's varchar returns as varchar then the following entry should be
- ; set to 1.
- ; See Trakker 459431 for more description.
- ;
- Return Varchar=1
- [Misc Version:12.0.0]
- Return Varchar=0
- [Misc Version:12.5.0]
- Return Varchar=0
- [Misc Version:12.5.1]
- Return Varchar=0
- [Misc Version:12.5.2]
- Return Varchar=0
- [Misc Version:12.5.3]
- Return Varchar=0
- [Misc Version:15.0.0]
- Return Varchar=0
- [Misc Version:15.0.1]
- Return Varchar=0
- ;
- ; Support of UDA USER OPTIONS.
- ;
- [UDA USER OPTIONS]
- Attach=SET QUOTED_IDENTIFIER ON
- [I18N Encoding Mapping]
- iso_1=ISO8859-1
- eucgb=ibm-1383
- euccns=ibm-964
- eucksc=ibm-970
- tis620=tis-620
- cp874=cp874
- [DRIVER:SYODASE.DLL]
- ;Since SET QUOTED_IDENTIFIER is ON, identifiers should be delimited by double quotes
- ;Overwrite ODBC SQLGetInfo which returns a space for SQL_IDENTIFIER_QUOTE_CHAR
- SQL_IDENTIFIER_QUOTE_CHAR="""
- ;Driver returns 30 which is incorrect
- SQL_MAX_TABLE_NAME_LEN="28"
- [DRIVER:Adaptive Server Enterprise Version:15]
- ;Since SET QUOTED_IDENTIFIER is ON, identifiers should be delimited by double quotes
- ;Overwrite ODBC SQLGetInfo which returns a space for SQL_IDENTIFIER_QUOTE_CHAR
- SQL_IDENTIFIER_QUOTE_CHAR="""
- ;Driver returns 30 which is incorrect
- SQL_MAX_TABLE_NAME_LEN="28"
- Connection Access Mode Is Changeable="F"
|