ERROR - SQL Error '[Cache ODBC][State : S1000][Native Code 29]

I have been using the query below and it was working fine but now it's giving a SQL error. There were no changes made that could cause this to stop working. There is no Field 'APPLICATIONID' in the table.

QueueSQL=select distinct (convert(char(5),SkillsetID)+'='+Skillset) from iagentbySkillsetStat where ApplicationID > 10000
QueueMappingSQL=SELECT DISTINCT (convert(char(5),SkillsetID)+'='+Skillset), SkillsetID FROM iagentbySkillsetStat iagentbySkillsetStat WHERE (iagentbySkillsetStat.ApplicationID>10000)

DB- Intersystems Cache

Error details for the log files are below.

14/09/2016 11:20:05 a.m. > ERROR - SQL Error '[Cache ODBC][State : S1000][Native Code 29]
[C:\xlink\xlink Compiled Package\Xlink Application\Isps_Ul.exe]
[SQLCODE: <-29>:]
[Cache Error: <errdone+2^%qaqqt>]
[Details: ]
[%msg: < SQL ERROR #29: Field 'APPLICATIONID' not found in the applicable tables^select distinct ( convert ( char ( 5 ) , SkillsetID ) + :%qpar(1) + Skillset ) from iagentbySkillsetStat where ApplicationID >>]'

Thanks in advance.

  • 0
  • 0
  • 2542
  • 4
  • 2

Answers

How did you get this query?

You need to remove ApplicationID from the query, as that field does not exist. Maybe it was an ID field instead and got changed into ApplicationID somehow?

Hi

This query was developed by an ex  employee and it was working perfectly till now.

My doubt is that if the table doesn't contains the specific field how was it working earlier?

I can remove ApplicationID from the query but was under the impression that it would stop the query from working.

Below is the output from log files when the query was functional.

24/08/2016 4:17:39 p.m. > select distinct (convert(char(5),SkillsetID)+'='+Skillset)  from iSkillsetStat where ApplicationID > 10000
24/08/2016 4:17:46 p.m. > Queue '10018:'  added
24/08/2016 4:17:46 p.m. > Queue '10017:'  added
24/08/2016 4:17:46 p.m. > Queue '10021:'  added
24/08/2016 4:17:46 p.m. > Queue '10142:'  added
24/08/2016 4:17:46 p.m. > Queue '10198:'  added
24/08/2016 4:17:46 p.m. > Queue '10071:'  added

 

 

 

  1. Can you access Caché studio?
  2. Do you see ApplicationID field in iSkillsetStat (or SQLUSER.iSkillsetStat) table in any database explorer application?

Hi Eduard,

No, I can't access cache studio, I'm connecting via ODBC.

No that field is not available.

 

In your question and comment I see two tables iagentbySkillsetStat and iSkillsetStat. Are you sure that you working with right table which contains such property ?

 

Hi Dmitry,

 

Thanks for pointing that out, I'm not sure how it happened but the tablename in the query must have got changed somehow.

I changed the query back to the query from the log files when it was working and it executes now.

 

Thanks a lot for your help :-)