Hi All,
In the above post I made a typo
SQL +
SELECT STORE, DIV +
INTO :WS-STR, :WS-DIV +
FROM STORET +
WHERE STORE = :WS-STORE-NBR
CASE SQLCODE
Actually I gave the INTO clause just before FROM but I misplaced it when typing in the forum. The -104 error is for the above query
Syntax I found in CA Easytrieve Language Reference Manual:
{ {* }
[DISTINCT] { {expression }
SELECT [ ] { { } +
[ALL ] { {table-name.* }
{ {correlation-name.*}
}
[ {expression } ] }
[, {tabLe-name.* } . ..] } +
[ {correlation-name.*} ] }
}
FROM table-name [correlation-name] +
[,table-name [correlation-name] ...] +
[WHERE search-condition] +
[GROUP BY column-name + ] +
[ [, column-name ...] ]
[HAVING search-condition] +
[ { {* } ]
[ [DISTINCT] { {expression } ]
[UNION SELECT [ ] { { } + ]
[ [ALL ] { {table-name.* } ]
[ { {correlation-name.*} ]
[ ]
[ } ]
[ [ {expression } ] } ]
[ [, {table-name.* } ...] } + ]
[ [ {correlation-name.*} ] } ]
[ } ]
[ ]
[ FROM table-name [correlation-name] + ]
[ [,table-name [correlation-name] ...] + ] +
[ ]
[ [WHERE search-condition] + ]
[ ]
[ [GROUP BY column-name + ] + ]
[ [ [, column-name ...] ] ]
[ ]
[ [HAVING search-condition] ]
[ {column-name} [ASC ] ]
[ORDER BY { } [ ] + ]
[ {integer } [DESC] ]
[ ]
[ [ {column-name} [ASC ] ] ]
[ [, { } [ ] ...] ] +
[ [ {integer } [DESC] ] ]
INTO :host-variable [, :host-variable...]
INTO :host-variable [, :host-variable...] INTO identifies where the column values are to be placed. The INTO clause must be the last clause coded on the SELECT statement.
Regards,
rskmfguy