root/projects/querysqlexport/trunk/defn/ApplicationEnginePrograms/GS/GS_QRYSQL/GS_QRYSQL.MAIN.GBL.default.1900-01-01.Step01.OnExecute.pcdefn.peoplecode

Revision 25, 0.8 KB (checked in by larry.grey, 20 months ago)

Changed to create files in proper version control directory.

Line 
1Local ApiObject &MyQuery, &MySession;
2Local string &QryToProcess;
3Local File &fileSQL;
4
5&MySession = %Session;
6
7If &MySession <> Null Then
8   
9   rem Get List of Queries to Process;
10   Local SQL &sqlGetQueries = CreateSQL("select QRYNAME from PSQRYDEFN where QRYNAME like 'GS%'");
11   While &sqlGetQueries.Fetch(&QryToProcess)
12     
13      &MyQuery = &MySession.getquery();
14     
15      &MyQuery.open(&QryToProcess, True, True);
16     
17      &fileSQL = GetFile("C:\Documents and Settings\Administrator\Application Data\Grey Sparling Version Control\demorepo\DEV\defn\Queries\GS\" | &QryToProcess | ".sql", "w", "a", %FilePath_Absolute);
18     
19      &fileSQL.WriteLine("-- " | &MyQuery.name | ", " | &MyQuery.description);
20      &fileSQL.WriteLine(" ");
21      &fileSQL.WriteLine(&MyQuery.metasql);
22     
23   End-While;
24   
25End-If;
Note: See TracBrowser for help on using the browser.