Page 1 of 1

Need help in understanding Universe query

Posted: Sun Sep 06, 2009 2:42 am
by zulfi123786
What is @RECORD and what value it contains in the following query????

The query is

SELECT
DS_JOBS.NAME AS JOB_NAME,
DS_JOBS.CATEGORY,
DS_JOBOBJECTS.NAME AS OBJECT_NAME,
DS_JOBOBJECTS.OLETYPE, EVAL DS_JOBOBJECTS."if index(@RECORD,'#prmSearchArg#',1) = 0 then '0' else 'FOUND' " as REC,
EVAL DS_JOBOBJECTS."if index(@RECORD,'#prmSearchArg#',1) = 0 then 0 else
dcount(@RECORD[1, index( @RECORD,'#prmSearchArg#',1)], @FM)" AS FOUND FMT '5R'
FROM DS_JOBS, DS_JOBOBJECTS
WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO
and FOUND > 0 and REC<>'0'
and DS_JOBS.CATEGORY like '#prmHbusFilter#%'
GROUP BY JOB_NAME, DS_JOBS.CATEGORY, OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, REC,FOUND
ORDER BY DS_JOBOBJECTS.OLETYPE, DS_JOBS.CATEGORY, JOB_NAME;

Posted: Sun Sep 06, 2009 2:47 am
by ray.wurlod
@RECORD is the entire data record as a single string, with individual fields (columns) delimited by the "field mark" character (also accessible as the @FM system variable). Within multi-valued fields, individual values are delimited by "value marks" (@VM) and within multi-subvalued values the individual subvalues are delimited by "subvalue marks" (@SM). Thus is the non-first-normal-form structure implemented, at least at the first three levels.