12.07.2015 Views

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6Using the T<strong>SQL</strong> Shell6.1 Getting StartedAt the terminal prompt enter: DO ^%apiT<strong>SQL</strong>.You should see something like this:Current settings :-No current settingsUSER:T<strong>SQL</strong>>What is shown as USER here is the current namespace. You can change the namespace byinvoking the Cache ObjectScript ZNSPACE command from within T<strong>SQL</strong> using the CACHEextension, as follows:USER:T<strong>SQL</strong>>CACHE {ZNSPACE "SAMPLES"} /xPress the return key twice to compile and execute. The terminal prompt now is:SAMPLES:T<strong>SQL</strong>>To begin entering T<strong>SQL</strong> code, try the following:SAMPLES:T<strong>SQL</strong>>PRINT GETDATE() /xAgain, press the return key twice. The '/x' at the end of the line tells T<strong>SQL</strong> to compile andexecute. The GETDATE function returns the current date and time.<strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong> 45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!