Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've visit the other threads about preceding load problems but couldn't really get an answer to my problem.
I've created a table from an Oracle database with the following script
EXAM_SIGNATURES:
LOAD "SIGNATURE_ID",
"PARENT_ID" as EXAMINATION_ID,
"CODE_ID",
SIGNATURE,
"PARENT_TYPE",
ACTIVE,
"SIGNATURE_DATE",
DESCRIPTION
;
SQL SELECT SS.SIGNATURE_ID,SS.PARENT_ID,SS.CODE_ID,
SS.SIGNATURE, SS.SIGNATURE_DATE, SS.PARENT_TYPE,SV.DESCRIPTION, SS.ACTIVE
FROM DORIS2.SIGNATURES SS
LEFT JOIN DORIS2.SIGNATURETYPES_V SV ON
SS.CODE_ID = SV.CODEID
WHERE SS.PARENT_TYPE IN( 'E')
AND SS.SIGNATURE_DATE > to_date('2008-01-01','YYYY-MM-DD');
From this table I'd like to create specific signature_date fields depending on the code_id, something like this:
SIGNATURE_DATES:
LOAD *,
if("CODE_ID"='163811', "SIGNATURE_DATE") as TidBokad,
if("CODE_ID"='163810', "SIGNATURE_DATE") as PatAnkomst,
if("CODE_ID"='163812', "SIGNATURE_DATE") as UsUtförd,
if("CODE_ID"='163815', "SIGNATURE_DATE") as IDKontroll,
if("CODE_ID"='163817', "SIGNATURE_DATE") as Ssk/Usk,
if("CODE_ID"='163814', "SIGNATURE_DATE") as UsGodkänd,
if("CODE_ID"='163766', "SIGNATURE_DATE") as PrelSvar,
if("CODE_ID"='164073', "SIGNATURE_DATE") as SvarDikterad,
if("CODE_ID"='163809', "SIGNATURE_DATE") as SvarSkrivet,
if("CODE_ID"='163808', "SIGNATURE_DATE") as SvarSignerat,
if("CODE_ID"='163802', "SIGNATURE_DATE") as TillSekreterare
;
LOAD "CODE_ID",
"SIGNATURE_DATE"
RESIDENT EXAM_SIGNATURES;
[/CODE]
My problem is that I get this msg about SYNTAX ERROR: A MISSING/MISPLACED FROM. Is it because I'm using a resident load instead? I've tried having the IF-statements in the first table (EXAM_SIGNATURES) but it didn't help.
Anyone with a sharp eye who can find the error? [:P]
Regards
Mi
</body>
Your field, Ssk/Usk, has an invalid character in it. Enclose it in quotes:
Ssk/Usk -> "Ssk/Usk"
or
Ssk/Usk -> [Ssk/Usk]
Regards,
Stephen
Your field, Ssk/Usk, has an invalid character in it. Enclose it in quotes:
Ssk/Usk -> "Ssk/Usk"
or
Ssk/Usk -> [Ssk/Usk]
Regards,
Stephen
Hi, Mi.
I think that your problem in line:
if("CODE_ID"='163817', "SIGNATURE_DATE") as Ssk/Usk
this FieldName (Ssk/Usk) not corrected, try use this code:
if("CODE_ID"='163817', "SIGNATURE_DATE") as [Ssk/Usk]
instead your line.
Thanks for your help! It was the invalid character that causes the syntax error.
A beginner's fault
Regards
Mi