Bartender Prompts Follow

0
Avatar
john lawrence

 I'd like to scan in a code and then parse it into two values for use in my custom sql code.  For example I like to scan the following code:

123456-1

I'd like to parse it using the dash as my delimiter so I have the first field (Job Number) to be 123456 and the second field (Job Line) to be 1.

I know how to use VB script to get one value but how do I create the second value in the same script and use it in my SQL code?

2 comments

0
Avatar
adam cummick
Comment actions Permalink

The easiest way to get that result is with the vb split function. The results would be stored in testArray(0) and testArray(1).

Example:

Dim testArray()

testArray = split(scanInputCode,"-")

 

0
Avatar
john lawrence
Comment actions Permalink

Will I then be able to use testArray(0) and testArray(1) in my SQL code?

Please sign in to leave a comment.