Skip to main content
Solved

Using a User Parameter in Esri Geodatabase (SDE) Writer Where Clause causing missing quote error

  • December 22, 2023
  • 2 replies
  • 33 views

garbadek
Contributor
Forum|alt.badge.img

I have what I hope is a simple question. I'm using a Where clause in my Esri Geodatabase (SDE) Writer. One of the criteria I'm using in my Where clause is that a jurisdiction matches a value being passed in using a User Parameter. This value "jurisdiction" parameter has a comma in it (which I think is the problem). When I manually type the Where Clause in as Jurisdiction = 'SomeName County,St' it works no problem. When I pass the parameter (I.E. "Jurisdiction = '$(parJurisdiction)') with parJurisdiction set to the exact same value I get:

 

"Unclosed quotation mark after the character string 'SomeName County))'

 

Any suggestions as to how to solve this problem would be appreciated.

 

Thank you.

K

Best answer by joepk

I cannot help you with your actual question, but a workaround could be building your Where Clause in an attribute.

Use the Creator to create a null feature and a StringConcatenator to build the Where Clause. You can then use the feature as initiator for a FeatureReader and pass the Where Clause attribute as Where Clause.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

joepk
Influencer
Forum|alt.badge.img+20
  • Influencer
  • Best Answer
  • December 22, 2023

I cannot help you with your actual question, but a workaround could be building your Where Clause in an attribute.

Use the Creator to create a null feature and a StringConcatenator to build the Where Clause. You can then use the feature as initiator for a FeatureReader and pass the Where Clause attribute as Where Clause.


garbadek
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • December 22, 2023

What wound up working was sort of a variation of @joepk​'s idea. I added an Attribute Manager after a Creator and just set an new attribute equal to the parameter value that contained the comma (,). Then I just substituted the new Attribute into the Where Clause rather than the Parameter and Bob's your uncle it works.