Greetings.

regarding the Migration to MS SQL Server/T-SQL, what has worked for me
in the past was:

1) Either export to SQL Script and then apply a couple of
Regex/Beanshell Replacements using JEdit:

Simple Replace:

NUMBER(                   DECIMAL(
TIMESTAMP                 DATETIME2
SYSDATE                   current_timestamp
CLOB                      VARCHAR(max)
BLOB                      VARBINARY(max)

Jedit Regex + BeanShell:

TABLE (\w*)\.\"?(\w*)\"?   "TABLE [" + _1.toLowerCase() + "].[" + 
_2.toLowerCase() + "]"
index (\w*)\.(\w*)         "INDEX " + _2.toLowerCase()
ON (\w*)\.\"?(\w*)\"?      "ON [" + _1.toLowerCase() + "].[" + _2.toLowerCase() 
+ "]"
(\w*)\.(\w*).NEXTVAL       "NEXT VALUE FOR " + _1.toLowerCase() + "." + 
_2.toLowerCase()
/\*TRANSACT: ([\w\s]*)\*/  _1.toUpperCase()

2) Alternatively, parse your exported SQL with JSQLParser and the use a
customized De-Parser to rewrite it T-SQL compliant.
Illustration is here:
https://www.manticore-projects.com/JSQLParser/usage.html#parse-a-sql-statements

Good luck and cheers
Andreas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/f32c5a72d4738c11ead6505a2d89f9ac972549be.camel%40manticore-projects.com.

Reply via email to