SQL Queries - Notes and Tips
The freeform SQL gives you a flexible way of querying the archive. You can query any table or combination of tables and have control over the columns returned.
From iDR2 download links to the FITS files are returned if a user selects filename as one of the columns returned by the query.
Various documentation, including introductory examples, is available to assist querying the archive.
The startHere page gives additional details of the GES archive. The archive database structure (tables and columns etc), is documented in the schema browser.
Uploading and using a file as #userTable
The enhanced version of the SQL form allows a file to be uploaded as a temporary table, called #userTable, and used in the query. If column names are given in the file then the same names are used where possible in #userTable (some names might be reserved SQL keywords). If no column names are present then the columns are labelled col1 ... colN.
This functionality is useful if you have a long list of ID numbers eg multiframeIDs, sourceIDs that you wish to use in you query. For example if a file contained a column of sourceIDs then it could be uploaded and used with:SELECT s.ra,s.dec,s.framesetid FROM vhsSource AS s, #userTable AS u WHERE s.sourceID=u.sourceID
The temp table #userTable only lasts for the lifetime of the query.
Home | Overview | Browser | Access | Login | Examples
Links | Credits
WFAU, Institute for Astronomy,