Database Preparse Example
This viper method can be used to test how an sqlquery will be preparsed by the Database layer before it is passed on to the DBMS. This viper method is especially useful if you are writing sqlqueries for an Oracle database because the preparser does the most work trying to make SqlServer queries work under Oracle without modifications. The preparser does hardly any work to make Oracle queries run under SqlServer.
Smartsite SXML | Copy Code |
---|---|
{database.preparse(My_OracleDb, "select top 5 Loginname, isnull(Email, '(No email)') from dbo.Users")} |
Example Result | Copy Code |
---|---|
select * from (select Loginname, nvl(Email, '(No email)') from Users) where rownum<=5 |