投稿済み Tue, 29 May 2018 18:35:54 GMT 、投稿者 Daryl Foxhoven

I'm trying to use a SQL Statement to return values in a Workflow.  The issue, is there may be more than 1 entry, although all the values will be the same...it's appending the values to the field...when all I want is the first entry it finds.  Since I cannot modify the select statement to "limit 1"...is there anothe way so that it only returns the first value found and not all of them.  Using MS SQL.

 

Thanks!

 

Daryl

投稿済み Wed, 30 May 2018 09:15:55 GMT 、投稿者 Phil Robson DocuWare Corporation Senior Director Professional Services, Americas

Are the values delimitered? If they are, place them in to a text variable and extract the first characters before the delimiter.
For example, if the string returned is "123456;4455;9999" then
Var = Left(Return_Var, Instr(Return_Var,";")-1)

The Instr function will find the first semi-colon and return its position - which is 7. The -1 deducts 1 making the value 6.

The Left function then returns the left most 6 characters - 123456

 

Phil Robson
Senior Director Support Americas

フォーラムに投稿するためにはログインが必要です。