INTRODUCTION
In agility the user can interact direct with the database. Obviously this needs knowledge of the database structure but this can provide a user with information very quickly.
STARTING SQL
To start SQL go to Reporting\Interactive SQL Queries and this window opens:
Where it says SQL statement this is where the user can type and paste content.
If, the user wants to save this query then go to File\Save\Enter a name for the query and select OK
To open select the yellow folder and choose from the list.
In SQL the where clause lets the user reduce what information is being returned.
The standard format for SQL:
SELECT- This is where you are listing the fields in the database required or use a wild card * for ALL columns
FROM - The table that holds the data
WHERE - The filter that allows the user to return only certain bits of information rather than everything.
SAVE and OPEN QUERY
Many times a query may be sent to help a company these can be chargeable.
Once a query has been sent these can be copied and then pasted into the above screen.
The user can then SAVE the query by selecting File - SAVE and a window opens to enter a name for the script.
Once name is entered press OK
To open queries that have been saved go to Reporting - Interactive Queries
Then File - OPEN
From the list select the query required
Once highlighted press SELECT
EXAMPLE
The feature also allows a Date and Stock Parameter if needed using the following format.
trandate between <"Enter Start Date DD-MON-YY"'01-JAN-04'> and <"Enter End Date DD-MON-YY"'31-DEC-04'> and s.stkcode = <"Enter Stock Code"'Invalid Code'>
Trandate is the field
<"Enter Start Date DD-MON-YY"'01-JAN-04'> This is used so the user can enter a start date
<"Enter End Date DD-MON-YY"'31-DEC-04'> This is used so the user can enter an end date
Stkcode -s the field
= <"Enter Stock Code"'Invalid Code'> This is used to create the parameter