подскажите тогда почему они не попадают у меня в select?
:P_SQL := 'select distinct doc.id, sop.name, doc.commentary, doc.createdat, op.title, stor.name, doc.totalsum, logg.username
from supermag.smdocuments doc, supermag.saoperation sop, supermag.smuserop op, supermag.smstorelocations stor, supermag.smspec spec,
supermag.smdoclog logg,'
||
supermag.RepTools.ClassString(2) ||
'supermag.smcard c
where doc.doctype = ''WO'' and (doc.createdat between :P_FIRSTDATE and :P_LASTDATE)
and op.id = doc.userop and doc.opcode = sop.id and doc.locationfrom = stor.id and spec.itemprice = ''0''
and logg.id = doc.id and doc.docstate = ''3'' and spec.doctype = ''WO''
and (logg.recid = (select min(recid) from supermag.smdoclog where id = doc.id)) and spec.docid = doc.id
and doc.locationfrom = doc.locationfrom '
|| supermag.RepTools.LocString(0,'doc.locationfrom') ||
' and spec.article = c.article ' ||
supermag.RepTools.ClassString(3,'c') ||
' order by 6,4;';
все гранты выдал, только польз-ские операции у меня в выборке..