AquaFold
HOME SCREENSHOTS DOWNLOAD DOCUMENTATION SUPPORT LICENSING CONTACT
 

Documentation: Aqua Data Studio 6.5 - New Features     HTML Documentation download, ZIP: ads-docs.zip (Size: 84.7MB) / ads-docs-no-shots.zip (Size: 1.2MB)
  Getting Started
  Installation
  JDBC Drivers
   Oracle 8i
   Oracle 9i
   Oracle 10g
   DB2 7.2
   DB2 8.1
   DB2 9.0
   SQL Server
   Sybase ASE
   Sybase Anywhere
   Sybase IQ
   Informix
   PostgreSQL
   MySQL
  Memory Configuration
  Character sets
  Registering Servers
   MSDE 2000
   SQL Express 2005
   PostgreSQL SSL
  Application
   Browser and Scripting
   Visual Editing
   SQL History and Archive
   Shortcut Toolbar
   Key Mappings
   Key Mapping Assistant
   Custom Keymap Profiles
   Options
   Settings
   New Frame Window
   Details View
   Command Line
  Query Window
   Basics
   Toolbar
   Server Side Comments
   SQL Automation
   Aqua Commands
   Morph to Delimited List
   Results
   Save Results
   Auto-completion
   Popup Menu
   SQL Formatter
   Permissions
   Parameterized
   Pivot Results (Grid and Chart)
   Grid Results (Grid and Chart)
  Editors
   SQL Editor
   Text Editor
   HTML Editor
   XML Editor
   Regular Expressions
  Image Viewer
  Visual Explain Plan
   Basics
   Explain Plan
   Explain Diagram
   Whiteboard
  Procedure/Package Editor
  SQL Debugger
   Sybase Debugger
   Oracle Debugger
  Tools
   Table Data Editor
   Schema Script Generator
   Server Script Generator
   ER Diagram
   Query Builder
   Import Tool
   Export Tool
   Execution Monitor
   Object Search
  Compare Tools
   Schema Compare
   Tab Compare
   Directory Compare
   File Compare
   Copy History Compare
   Results Compare
  Oracle DBA Tools
   Instance Manager
   Storage Manager
   Rollback Manager
   Log Manager
   Security Manager
   Session Manager
   SGA Manager
   Server Statistics
  SQL Server DBA Tools
   Instance Manager
   Storage Manager
   Security Manager
   Session Manager
   SQL Agent Manager
  Sybase DBA Tools
   Instance Manager
   Storage Manager
   Security Manager
   Session Manager
  Source Control
   Subversion
   CVS
Query Window - Parameterized Script

The Query Analzyer now supports parameterized scripts.
Query Window - Parameterized Script
From the query toolbar the user may enable/disable the parameterized scripts. By enabling them, the user may have scripts with defined parameters so that Aqua Data Studio will prompt for the values of the parameters before executing the script. Parameters are defined by a leading "&".

- Simple parameter query -
   Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_ID = &id

- Parameter query in a quoted string
   Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_NAME = '\&name'

Parameters are also supported in server side comments. Client side and server side comments may be defined in File->Options->Scripts for each database. If a parameter is defined in a client side comment it will be ignored. Parameters in server side comments will be prompted and replaced.

Parameters also support default values. Default values may be defined by appending an "=" and the value after the name of the parameter. Default values may be single quoted to support values with spaces and special characters.

- Simple parameter query -
   Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_ID = &id=10

- Parameter query in a quoted string
   Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_NAME = '\&name='Sales Dept''

Date and time expressions in parameter values scripts.

This feature allows a user to specify a default value of a parameter to be a date expression. Added File->Options:General:"Parameterized Scripts" which has the option to specify the tags for the date and time expressions and whether to prompt

- File->Options:General:"Parameterized Scripts"
- DateTime Tag: dt
- Date Tag:
- Time Tag:
- DateTime at Midnight Tag
- Prompt for parameter values

- Date & Time Expressions
[Configurable in File->Options:Parameterized Scripts]

Current Units
-------------------
d = current date
t = current
dt = current date time
dm = current date at midnight


Time Units
--------------------
y Year
M Month
d day
h Hour
m Minute
s Second
S Millisecond

Examples:

{d-1y} = current date - 1 year
{dt-2h-3m-8s-340S} = current date and time minus 2 hours, minus 3 minutes, minus 8 seconds, minus 340 milliseconds
{dm+6h} = current date at midnight, plus 6 hours ... basically today at 6am.

- SQL Example:
[This query will return a list of orders that have occurred in the last month]
SELECT * FROM ORDERS WHERE ORDER_DATE > &myparam={dt-1M}

select * from orders
where orderdate > &myparam={dt-10y-4M-18d}

Parameterized Scripts
Paramterized Scripts
Home Screenshots Downloads Documentation Support Licensing Contact Copyright© 2001-2007 AquaFold, Inc. All Rights Reserved