on 05-30-2012 6:52 AM
Hi Experts,
I'm creating formatted search in marketing documents but I can't seem to complete for I having an error with my sql codes. Please see the sample codes below
Select Case $[ORDR.OWNER]
When '2' then (SELECT GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch1')
When '3' then (SELECT GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch2')
When '4' then (SELECT GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch3')
else
' '
end
The number 2, 3, & 4 is the Employee Code. What I want to happen is, first I'm going to select the employee and from that the business partner List will be filtered in marketing data base on the branch that was tagged to employee master data. Can someone help me fix my sql codes? Thanks in advance.
Regards,
Horhe
Hi Horhe,
What is the error ?
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Internal error means the data did not match in the query you made. I'll try to revise you query.
Select Case $[ORDR.OWNERCODE]
When '2' then (SELECT GroupCode FROM OCRG WHERE GroupName LIKE 'Branch1')
When '3' then (SELECT GroupCode FROM OCRG WHERE Groupname LIKE 'Branch2')
When '4' then (SELECT GroupCode FROM OCRG WHERE Groupname LIKE 'Branch3')
else
' '
end
From ORDR
Hope this can help you to see what might be the error.
Regards,
RD
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.