////////////////////////////////////////////////////////////////////////////// // // Teradata SQL highlighter written by Geoffrey Rommel // Teradata V2R6.1 // Keywords are taken from the Teradata SQL Reference, Volume 1 (Fundamentals), // V2R6.1 (B035-1141-115A, November 2005) // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // language name Language: TDSQL6 ////////////////////////////////////////////////////////////////////////////// // default file filter // note: if more than one extension is associated, eg: // C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp Filter: SQL files (*.sql)|*.sql ////////////////////////////////////////////////////////////////////////////// // help file which will be invoked when F1 is pressed HelpFile: ////////////////////////////////////////////////////////////////////////////// // language case sensitivity // 0 - no // 1 - yes CaseSensitive: 0 ////////////////////////////////////////////////////////////////////////////// // comment type: LineComment - comment to the end of line // BlockCommentBeg - block comment begin, it could be // multiline // BlockCommentEnd - block comment end LineComment: -- BlockCommentBeg: /* BlockCommentEnd: */ ////////////////////////////////////////////////////////////////////////////// // identifier characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char IdentifierBegChars: a..z A..Z _$# IdentifierChars: a..z A..Z _$# 0..9 ////////////////////////////////////////////////////////////////////////////// // numeric constants begin characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char // number always starts with 0..9 except when NumConstBeg // defines other NumConstBegChars: 0..9 ////////////////////////////////////////////////////////////////////////////// // numeric constants characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char // number always starts with 0..9 except when NumConstBeg // defines other NumConstChars: 0..9 .eE+- ////////////////////////////////////////////////////////////////////////////// // escape character EscapeChar: ////////////////////////////////////////////////////////////////////////////// // keyword table // note: delimited with spaces, lines could be wrapped // you may divide keywords into two groups which can be // highlighted differently // Group 1 contains reserved words ("Reserved" and "Future" in the manual). // Group 2 contains non-reserved words. // One exception: SIMILAR is included in group 2 because I happen to know // that it is planned for a future release. // Words that are listed only in the ANSI columns are not in these groups. KeyWords1: abort abortsession abs access_lock account acos acosh add add_months admin after aggregate alias all alter amp and ansidate any arglparen as asc asin asinh at atan atan2 atanh atomic authorization ave average avg before begin between binary blob both bt but by byte byteint bytes call case case_n casespecific cast cd char char_length char2hexint character character_length characters chars check checkpoint class clob close cluster cm coalesce collation collect column comment commit compress constraint constructor consume continue convert_table_header corr cos cosh count covar_pop covar_samp create cross cs csum ct cube current current_date current_time current_timestamp cursor cv cycle database datablocksize date dateform day dec decimal declare default deferred degrees del delete desc descriptor deterministic diagnostic disabled distinct do domain double drop dual dump each echo else elseif enabled end eq equals error errorfiles errortables escape et except exec execute exists exit exp explain external extract fallback fastexport fetch first for foreign format found freespace from full function ge generated give go goto grant graphic group grouping gt handler hash hashamp hashbakamp hashbucket hashrow having help hour identity if immediate in inconsistent index indicator initiate inner inout input ins insert instance instead int integer integerdate intersect interval into is iterate join journal key kurtosis language large le leading leave left like limit ln loading local locator lock locking log logging logon long loop lower lt macro map mavg max maximum mcharacters mdiff merge method min mindex minimum minus minute mlinreg mload mod mode modify monitor monresource monsession month msubstr msum multiset named natural ne new new_table next no none not nowait null nullif nullifzero numeric object objects octet_length of off old old_table on only open option or order ordering out outer over overlaps override parameter password percent percent_rank perm permanent position precision prepare preserve primary private privileges procedure profile protection public qualified qualify quantile queue radians random range_n rank real recursive references referencing regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy relative release rename repeat replace replcontrol replication request restart restore restrict result resume ret retrieve returns revalidate revoke right rights role rollback rollforward rollup row row_number rowid rows sample sampleid scroll second sel select session set setresrate sets setsessrate show sin sinh skew smallint some soundex specific spool sql sqlexception sqltext sqlwarning sqrt ss start startup statement statistics stddev_pop stddev_samp stepinfo string_cs subscriber substr substring sum summary suspend table tan tanh tbl_cs temporary terminate then threshold time timestamp timezone_hour timezone_minute title to top trace trailing transaction transform translate translate_chk trigger trim type uc udtcastas udtcastlparen udtmethod udttype udtusage undefined undo union unique until upd update upper uppercase user using value values var_pop var_samp varbyte varchar vargraphic varying view volatile wait when where while width_bucket with work year zeroifnull zone KeyWords2: access ag allocation always analysis ascii assignment attr attribute attributes attrs c called changerate characteristics charset_coll checksum columnsperindex columnsperjoinindex comparison compile costs cpp cputime data dbc debug definer demographics denials digits dr ebcdic encrypt excl exclusive expire final float following g global high host ifp increment indexespertable indexmaintmode instantiable invoker iocount isolation java jis_coll k kanji1 kanjisjis kbyte kbytes keep kilobytes last latin level lockeduserexpire low m matched maxchar maxlogonattempts maxvalue medium minchar minvalue modified multinational name oa ordered_analytic partition partitioned preceding print protected query randomized range read recalc replacement retain reuse ru samples searchspace security seed self serializable share similar source specchar spl sqlstate sr stat stats style summaryonly system systemtest target td_general td_internal text ties tpa unbounded uncommitted unicode unknown use warning write KeyWords3: ////////////////////////////////////////////////////////////////////////////// // string delimiter: StringBegChar - string begin char // StringEndChar - string end char // MultilineStrings - enables multiline strings, as perl // has it StringBegChar: ' StringEndChar: ' MultilineStrings: 0 ////////////////////////////////////////////////////////////////////////////// // use preprocessor: 0 - no // 1 - yes // note: if yes, '#' and statements after it will be // highlighted with Preprocessor defined colors UsePreprocessor: 0 ////////////////////////////////////////////////////////////////////////////// // highlight line: 0 - no // 1 - yes // note: if yes, current line will be highlighted CurrLineHighlighted: 0 ////////////////////////////////////////////////////////////////////////////// // colors // note: first value is foreground, second is background color // and third (optional) represents font attribute: // B - bold // I - italic // U - underline // S - strike out // attributes can be combined: eg. B or BI // as value, it could be used any standard windows color: // clBlack, clMaroon, clGreen, clOlive, clNavy, // clPurple, clTeal, clGray, clSilver, clRed, clLime, // clYellow, clBlue, clFuchsia, clAqua, clLtGray, // clDkGray, clWhite, clScrollBar, clBackground, // clActiveCaption, clInactiveCaption, clMenu, clWindow, // clWindowFrame, clMenuText, clWindowText, clCaptionText, // clActiveBorder, clInactiveBorder, clAppWorkSpace, // clHighlight, clHighlightText, clBtnFace, clBtnShadow, // clGrayText, clBtnText, clInactiveCaptionText, // clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText, // clInfoBk // as value, it could be used hex numeric constant too: // $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00 SpaceCol: clWindowText clWindow Keyword1Col: clNavy clWindow B Keyword2Col: clGreen clWindow B Keyword3Col: clBlue clWindow B IdentifierCol: clWindowText clWindow CommentCol: clGray clWindow NumberCol: clRed clWindow StringCol: clGreen clWindow SymbolCol: clPurple clWindow PreprocessorCol: clBlue clWindow SelectionCol: clWhite clNavy CurrentLineCol: clBlack clYellow OverrideTxtFgColor: 0 BlockAutoindent: 0 BlockBegStr: BlockEndStr: Keyword4Col: clWindowText clWindow Keyword5Col: clWindowText clWindow MatchedBracesCol: clWindowText clWindow