Skip to main content
Solved

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


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.

View original
Did this help you find an answer to your question?

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings