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

Question

Question

db lookup in Workflow

asked on July 6, 2015

I am importing 100's of thousands records from another system.  They created a text file with metadata.  The first few hundred test records they gave me show the doc naming convention as 00001, 00002, 00003, etc.  The first line in the text file belongs to 00001, and the second line belongs to 00002, etc.

 

So I took the text file and converted it into an excel spreadsheet.  That way I could add the 'doc name' in the spreadsheet.  I had to make it custom to it could keep the leading 0's.

 

Then I took the spreadsheet and created an access db to do the lookup with.  Well.... it comes back with an error message says:  Query Data – Error (22018) Microsoft ODBC Microsoft Access Driver Data type mismatch in criteria express.  Then SW1 (name of workflow)  Error (22018) Microsoft ODBC Microsoft Access Driver Data type mismatch in criteria expression.

 

It's not numerical but when it imported to Access it became numerical.  When I try to convert to text it loses it's 0's.  So 1) is there anyway to fix this in access?  OR 2) is there any way that I can have my lookup look for 1 vs 000001?  I am afraid that if I say 1 it will find 1, 11, 21, 31, 41, etc.

 

 

0 0

Replies

replied on July 6, 2015

Instead of taking the metadata from a text file, to excel, to access, etc....  I would create a temp db on your SQL server, use the SQL import wizard to input the text file into a table you would use for your lookup in the workflow.  If you set the "doc name" column to the data type 'string', I believe you will retain your leading 0's so that you will have an exact match of 00001 when the  workflow activity uses the file name 00001.tif to perform the lookup. 

0 0
replied on July 8, 2015

Leave the number a standard number and do not worry about the leading zeros in the database.  Then, in your workflow, you should be able to apply formatting to the lookup token for the number to pad it with leading zeros for a 5 digit string.

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

Sign in to reply to this post.