You are viewing limited content. For full access, please sign in.

Question

Question

must declare the scaler vairiable

asked on December 5, 2014

I am running a select statement through Custom Query in workflow but I get an error while running a test: Must declare the scaler variable "@DocEntryID". (Annotation.jpg attached).

 

But when I declare a variable, I get 0 hits (Annotation 1.jpg attached).

 

Where am I doing wrong?

 

Note: It should return a count of 3 as I have tested this query in SQL and it works fine.

Annotation.png
Annotation 2.png
Annotation 3.png
Annotation.png (10.6 KB)
Annotation 3.png (10.42 KB)
0 0

Answer

SELECTED ANSWER
replied on December 5, 2014 Show version history

The Odbc interface does not recognize the use of @named variables, only ? which are taken by position. 

 

SELECT ann.page_id, ann.ann_text, doc.page_id FROM ann INNER JOIN doc ON ann.page_id=doc.page_id WHERE doc.tocid=?

 

Then in your Parameter definition section also just use ? and not @DocEntryID

ODBCQuery.png
ODBCQuery.png (11.87 KB)
1 0
replied on December 5, 2014 Show version history

Thanks a lot Bert.

All working perfect :)

 

 

SELECT COUNT(ann.page_id) As TotalAnns FROM ann INNER JOIN doc ON ann.page_id=doc.page_id WHERE doc.tocid=?

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.