You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Insert, Update, Select

Aqua Data Studio's Query Window - SQL Automation menus rapidly increase the speed of writing a query. Automate is the fifth menu (from left to right) in the Main Application Window.
The SQL Automation feature set in Aqua Data Studio (the "Automate" pull-down menu) helps you reduce the number of keystrokes made while writing SQL statements, and to let the application rapidly fill in what a user would normally spend seconds or minutes typing.
The largest amount of time spent typing is probably writing templates for basic SELECT, INSERT and UPDATE statements, including writing out the columns.
Below are examples of how to automate the writing of basic UPDATE and SELECT statements.
 
Automating an UPDATE statement

 

 

 

 

 

1. Click Automateinsert UPDATE

2. Select the Table

3. Move the Cursor

4. Column nameswithout typing

5. Finish the SQLStatement

Automating a SELECT statement

 

 

 

1. Click Automateinsert SELECT

2. Select the Table

3. Finish the SQLStatement

Automate INSERT 1. Press CTRL+ALT+Ia. Introduce an INSERT template, INSERT INTO () VALUES()b. Place the cursor at the INSERT INTO ^() VALUES() locationc. Popup a list of tables for autocompletion of the table name you want to INSERT data into
2. Type out the table you want and move the cursor to the column location, INSERT INTO MYTABLE(^) VALUES()
3. Press CTRL+ALT+Ca. Introduce all of the columns for the TABLE you have typed in a comma separated list in the order of definition
4. Move cursor to the values definition location INSERT INTO MYTABLE(COLUMN1, COLUMN2, ...) VALUES(^)
5. Press CTRL+ALT+Va. Introduce stubbed values for the columns of the table according to data type
6. At this point you have INSERT INTO MYTABLE(COLUMN1, COLUMN2, ...) VALUES('', 0, ...)
7. You can now finish your statement Automate UPDATE 1. Press CTRL+ALT+Ua. Introduce an UPDATE template, UPDATE SET WHEREb. Place the cursor at the UPDATE ^ SET WHERE locationc. Popup a list of tables for auto-completion of the table name you want to UPDATE
2. Type out the table you want and move the cursor to the column set location, UPDATE MYTABLE SET ^ WHERE
3. Press CTRL+ALT+Ca. Introduce all of the columns and value stubs for the TABLE you have typed in a comma separated list in the order of definition
4. At this point you have UPDATE MYTABLE SET EMPLOYEEID=0, NAME='', SALARY=0, TITLE=0, CREATEDDATE='2002-12-30 23:59:59.0' WHERE
5. You can now finish your statement Automate SELECT 1. Press CTRL+ALT+Sa. Introduce a SELECT template, SELECT * FROM WHERE b. Place the cursor at the SELECT * FROM ^ WHERE locationc. Popup a list of tables for auto-completion of the table name you want to SELECT
2. Type out the table you want and move the cursor to the column set location, SELECT ^* FROM MYTABLE WHERE
3. Press CTRL+ALT+Ca. Introduce all of the columns for the TABLE you have typed in a comma separated list in the order of definition
4. At this point you have SELECT EMPLOYEEID, NAME, SALARY, TITLE, CREATEDDATE FROM MYTABLE WHERE
5. You can now finish your statement All of the Automation functionality is in the Automate pull-down menu.|
Automate Menu


Automate Options
 |
 

  • No labels