Kbase 17471: Hyphens in the Actuate SQL must have a back slash (\).
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Hyphens in the Actuate SQL must have a back slash (\).
It may appear at times that "=" conditions in the SQL of Actuate
WHERE clauses is not being accepted by Actuate. For instance in the
following statement:
WhereClause = "JobMtl.Company = 'TEST' and cust-num =
10001 and JobMtl.AssemblySeq = " & gAssemblySeq
Actuate will behave as if the phrase:
cust-num = 10001
Isn't actually part of the SQL statement, and will return a value
without seeming to take this phrase into consideration.
The problem is in the SQL statement. The '-' (hyphen) in the column
name in the SQL query will be treated as "BETWEEN". If you want it to
to be treated as a hyphen, insert a backward slash (\) before the
hyphen. So the query will look like:
WhereClause = "JobMtl.Company = 'TEST' and cust\-num = 10001
and JobMtl.AssemblySeq = " & gAssemblySeq
(notice the '\' before the '-' in 'cust\-num')
This modification will return the value desired.
NOTE: This is not necessary for all Progress DB hyphened field names.
The SPORTS DB seems to be immune to problems with hyphens in
field names.
NOTE 2: This workaround does not seem to work for data within the
field itself. For instance, the situation:
warehouse = "12-B"
The hyphen in "12-B" seems to be treated as a BETWEEN even
if you add a '\'.
At the time of the writing of this kbase, there is not a
solution to this problem in Actuate.
12/17/97 FS
Progress Software Technical Support Note # 17471