Search found 2 matches

by eanjr715
Fri Aug 01, 2014 10:23 pm
Forum: EASYTRIEVE
Topic: variable as an argument in the sum function
Replies: 3
Views: 7753

This is a compiled EZPlus progam The host variables are loaded from an input file. a sample would be 0000110001LIV_PCT in-col-name has "LIV_PCT" in it ws-prod-id has "0000110001" SQL DECLARE CSRPRDID CURSOR FOR SELECT SUM(:IN-COL-NAME) FROM PROD_GRP_SLS_RCOG WHERE RCOG_PROD_GRP_ID = :WS-PRD-ID FOR F...
by eanjr715
Tue Jul 29, 2014 10:13 pm
Forum: EASYTRIEVE
Topic: variable as an argument in the sum function
Replies: 3
Views: 7753

variable as an argument in the sum function

I'd like to know if it is possible to use a variable as the srgument to the sum function. I have a file of column names and product ids, ie LIV_PCT, 0000110001. I wrote a program the reads in the file and populates 2 host variables. I declard a cursor as : SELECT SUM(:WS-COL-NM) from ..... ws-col-nm...