Getting Started #
You can load existing SQL Statements as Tables in TAD. This allows you to isolate specific records that may need to be downloaded or updated.
A sample SQL Statement is provided at the bottom of this article using the TAD Sandbox table which all users will have access to by default.
Loading a Table #
Click the Add Table button on the left side of the ribbon.

Click the Query button on the left side.

Paste the SQL Statement in the SQL Statement field.
Click the Load SQL button.

The following message will appear.

The SQL Statement field will be updated with just the SQL Statement and the various parts on the left side will be populated.

Change the Tab Name if you want.
Click the Download Changes button.

If you’re using the sample SQL Statement or one with parameters then you will see the TAD Parameters form.
Click the Download button.

You will see the records in the Table along with the blue action buttons for your workflow.

HQ Company Join #
If you have Company data security active in Vista then the HQCO table needs to be included in every SQL Statement. If the SQL Statement you load does not contain the HQCO table then it will automatically be added.
The statement below does not contain the HQCO table.

When you click the Load Report button you will receive the message below.

The statement below now contains the HQCO table.

Sample SQL Statement #
You can use the code below to load the TAD Sandbox as a Table.
/*Package:Download,Validate Import,Execute Import*/
/*Parameters:(Companies):udTADSandbox.Co*/
DECLARE @(Companies) varchar(100); SET @(Companies)=''
SELECT udTADSandbox.Co, udTADSandbox.Seq, udTADSandbox.State, udTADSandbox.BudgetAmt, udTADSandbox.KeyID
FROM udTADSandbox
INNER JOIN HQCO HQCompany ON udTADSandbox.Co=HQCompany.HQCo
WHERE (udTADSandbox.Co IN (@(Companies)) OR LEN(@(Companies))=0)