on ‎2010 Nov 03 11:30 PM
In the [; thread, Kurt Reinhardt wrote "Please note, a SQL Expression can only return a single, distinct value per each record in the main recordset.", I tried this where my main Record Selection's SQL query is:
{GLF_LDG_ACC_TRANS.ldg_name} = {@&CH_LDG_GL_ACT_CURR} and
{GLF_LDG_ACC_TRANS.period} = {@&CH_PERIOD_GL_CURR} and
{GLF_LDG_ACC_TRANS.ACCNBRI} "99991103" and
{GLF_LDG_ACC_TRANS.DOC_REF1} "{%SundryCreditors}" and
{GLF_LDG_ACC_TRANS.DOC_TYPE} = "$APINVCE"My SQL Expression %SundryCreditors is:
select doc_ref1
from glf_ldg_acc_trans
where ldg_name = 'APLED09'
and period = "GLF_LDG_ACC_TRANS"."PERIOD"
and doc_ref1 = "GLF_LDG_ACC_TRANS"."DOC_REF1"
and accnbri like 'SUNDRY%'which essentially queries the same table as the main recordset using the same key fields, and returns one row only. However, when I click on the Check button in the Formula Workshop window, I get the error message "Error in compiling SQL Expression : Database Connection Error: '42000:MicrosoftODBC SQL Server DriverSQL ServerIncorrect syntax near the keyword 'select'. Database Vendor Code: 156 '".
Do you know what is my issue?
Request clarification before answering.
If you wrote your SQl statement in the crystal reports formula workshop then the problem is that it is not crystal reports syntax. SQL cannot be writen there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.