|
Revision 25, 0.8 KB
(checked in by larry.grey, 20 months ago)
|
|
Changed to create files in proper version control directory.
|
|
|
| Line | |
|---|
| 1 | Local ApiObject &MyQuery, &MySession; |
|---|
| 2 | Local string &QryToProcess; |
|---|
| 3 | Local File &fileSQL; |
|---|
| 4 | |
|---|
| 5 | &MySession = %Session; |
|---|
| 6 | |
|---|
| 7 | If &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 | |
|---|
| 25 | End-If; |
|---|