Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've a query to store into a qvd, but after i need to be incrememental, but for that i need to use a field from my qvd into oracle clause.
Until now i use some kind a workaround creating a string with all rows in the field.
//******************************************************************************
//FIELD from QVD
MO_ISSUE_FIELD_STRING:
ISSUE_ID
FROM
[lib://Dados/TESTE/MO_ISSUE_FIELD_STRING.qvd](qvd);
//******************************************************************************
CONCATENATE(MO_ISSUE_FIELD_STRING)
//******************************************************************************
MO_ISSUE_FIELD_STRING:
Load
ID_ISSUE_FIELD_STRING AS ISSUE_FIELD_STRING_ID,
ISSUE_FIELD_ID,
ISSUE_ID,
FIELD_ID AS CATEGORY_ID,
FIELD_VALUE AS CATEGORY_VALUE,
1 AS ID_STORAGE_TYPE
;
select
ID_ISSUE_FIELD_STRING,
ISSUE_FIELD_ID,
ISSUE_ID,
FIELD_ID,
FIELD_VALUE
from MO_ISSUE_FIELD_STRING
where
????? // I WOULD LIKE TO PUT IN HERE ONLY ID_ISSUE THAT NOT IN MY QVD
//********************************************************************************
//WORKAROUND
LET vWHERE='';
LET Aux='';
ID_ISSUE_LIST:
load
DISTINCT
ISSUE_ID
RESIDENT MO_ISSUE;
For Each ISSUE_ID in FieldValueList('ISSUE_ID')
Aux='ISSUE_ID='& $(ISSUE_ID)&' OR ';
vWHERE=Aux& vWHERE;
NEXT
If Aux='' then
exit Script;
endif
Aux=LEFT(vWHERE,LEN(vWHERE)-3);
********************************************************************************
Hi Forest,
It take me about 1 hour, its not too much, but my point was if is possible to use a qvd field in a sql select, and its not.
I have from solution create a pk and get the higher value that reducted to a few seconds my extracting, but that was not the core of my question