Hi, I am trying to create a Crystal SQL Expression to be used in the 'Record Selection'. After creating the code I get an error stating that the Tables I am referencing can not be bound (there is more than one) crystal-sql-exp-error-01.jpg . However my tables are clearly in the "Field Tree". My attached example states "OR_LOG_ALL_SURG"."LOG_ID".
How can i resolve this issue?
My SQL code is below:
(Select Top 1 OR_Shifts.SHIFT_TYPE_C
From OR_LOC_SHIFT_TIMES AS OR_Shifts
Left Join ZC_SHIFT_TYPE AS ZC_Shifts ON OR_Shifts.SHIFT_TYPE_C = ZC_Shifts.SHIFT_TYPE_C
Where ZC_Shifts.ABBR Like '%' + "CLARITY_LOC"."LOC_NAME" + '%'
Order BY
(Case When (ZC_Shifts.ABBR Like '%' + "CLARITY_LOC"."LOC_NAME" + '%' AND ZC_Shifts.ABBR Like '%' + Left("DATE_DIMENSION"."DAY_OF_WEEK",3) + '%') Then 1 Else 0 End) Desc
,(Case When ZC_Shifts.ABBR = "CLARITY_LOC"."LOC_NAME" Then 1 Else 0 End) Desc
)
End
Request clarification before answering.
Still not supported, SQL Expressions should only be used by selecting one field, no SELECT statement. When creating the Expression use the functions available in the Functions windows, that's what your Database Client supports.
You should have see a warning box with more info, try searching also. There is a Kbase article on using SQL Expressions.
Another options is to create a Store Procedure to return the single value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 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.