12.07.2015 Views

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>Soluti<strong>on</strong></str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> <strong>on</strong> <strong>UNIX</strong> <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> <strong>on</strong> Windows 189NULLIFReturns a nullvalue if the twospecifiedexpressi<strong>on</strong>sare equivalentNULLIF(SYSDATE,SYSDATE)returns NULLNULLIFNULLIF(GETDATE (),GETDATE ())returns NULLDECODE Used <strong>to</strong> DECODE(DIS CASECASEevaluate the CONTINUED, DISCONTINUEvalues with "if- 0, 'No', 1, 'Yes',Delse" logic. 'NA')WHEN 0 THEN'No'WHEN 1 THEN'Yes'ELSE 'NA'ENDCASEUsed <strong>to</strong>evaluate thevalues with "if-CASEdisc<strong>on</strong>tinuedWHEN 0 THENCASECASEdisc<strong>on</strong>tinuedWHEN 0 THENelse" logic. 'No''No'WHEN 1 THEN'Yes'ELSE 'NA'ENDWHEN 1 THEN'Yes'ELSE 'NA'ENDQueriesThe SELECT statement is used <strong>to</strong> query the database and retrieve data. SELECT can becombined with some DDL and DML statements <strong>to</strong> per<str<strong>on</strong>g>for</str<strong>on</strong>g>m relati<strong>on</strong>al operati<strong>on</strong>s. Thefollowing different clauses comm<strong>on</strong>ly used with SELECT in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and <strong>SQL</strong> <strong>Server</strong> arediscussed in the remainder of this secti<strong>on</strong>.● Simple queries● Joins● Database links● Group by● Case● Set opera<strong>to</strong>rs● RownumOptimizer hints are not covered in this guidance. Both <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and <strong>SQL</strong> <strong>Server</strong> use costthatcan be used <strong>to</strong> influence the optimizer. Thebased optimizers and offer hintsoptimizer hints used with <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> are not available in <strong>SQL</strong> <strong>Server</strong>. For the various types ofhints available in <strong>SQL</strong> <strong>Server</strong> refer <strong>to</strong>http://msdn.microsoft.com/library/default.asp?url=/library/enus/acdata/ac_8_qd_03_8upf.asp.Simple QueriesA simple query is defined as a SELECT statement that retrieves data from a single tablewith or without filter c<strong>on</strong>diti<strong>on</strong>. Becausethis is a standard command, there are nodifferences in syntax or usage between <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and <strong>SQL</strong> <strong>Server</strong>. The following example isa valid statement <str<strong>on</strong>g>for</str<strong>on</strong>g> both <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and <strong>SQL</strong> <strong>Server</strong>.

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

Saved successfully!

Ooh no, something went wrong!