Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula help request 1

Status
Not open for further replies.

JetRamsey

Technical User
Oct 22, 2010
49
0
0
US
Below, I've listed the results for one field in my target SQL Server database. I've used a green highlight within this field to should the area that I would like to target. You'll notice a value of "124124" and I would like to create a formula based on this field to show 124124 without the quotes. Any tips on how to create a formula to do so? TIA

<ArrayOfKeyValueOfstringstring xmlns:i=" xmlns="[highlight #4E9A06]<KeyValueOfstringstring>
<Key>personNumber</Key>
<Value>"124124"</Value>
</KeyValueOfstringstring>
[/highlight]<KeyValueOfstringstring>
<Key>arrested</Key>
<Value>{"code":"Y","description":"Yes"}</Value>
</KeyValueOfstringstring>
<KeyValueOfstringstring>
<Key>localID</Key>
<Value>"local \"S1\""</Value>
</KeyValueOfstringstring>
<KeyValueOfstringstring>
<Key>fbinumber</Key>
<Value>"fbi no 123-S1"</Value>
</KeyValueOfstringstring>
<KeyValueOfstringstring>
<Key>sbinumber</Key>
<Value>"cii no 123-S1"</Value>
</KeyValueOfstringstring>
<KeyValueOfstringstring>
<Key>typeOfGlasses</Key>
<Value>{"code":"04","description":"OTHER / UNKNOWN"}</Value>
</KeyValueOfstringstring>
<KeyValueOfstringstring>
<Key>appearance</Key><Value>[{"code":"02","description":"DIRTY"},{"code":"01","description":"NEAT WELL DRESSED"}]</Value>
</KeyValueOfstringstring><KeyValueOfstringstring><Key>description</Key><Value>"this is a description and comments section within the person field."</Value></KeyValueOfstringstring>
<KeyValueOfstringstring><Key>clothing</Key><Value>"THis is what this suspect is wearing. A blue pair of pants and white shirt"</Value></KeyValueOfstringstring>
</ArrayOfKeyValueOfstringstring>
 
Are you saying you only want the first value in the string returned? If so, try this:

local stringvar x := {table.yourfield};
extractstring(x,'Value>"','"</Value') //what may appear like three apostrophes is a double quote followed by a single quote, and then the
//reverse for the second part--single quote followed by a double quote.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top