Thanks:  0
Likes:  0
Dislikes:  0

1. ## Split Function

UPDTD_DT_TM: DATE NULL

Hi,
In the above expression I would like to
store "UPDTD_DT_TM" "DATE" "NULL"
in three different columns of Excel sheet,
can I use split function to accomplish
this task?by inserting tabs after each value?

thanks
Pavan

2. ## Re: Split Function

Correction,I need to store multiple values
in Excel Sheet

UPDTD_DT_TM: DATE NULL
NBR: NUMBER(11) NULL
QTR_FLG: VARCHAR2(1) NULL
QTR_FLG: VARCHAR2(1) NULL

3. ## Re: Split Function

You can use the Replace function to extract the ":" and then use the Split function to split the text as you described. Something like this would work by combining all 4 original values into 1 array (arr3):

<font class="small">Code:</font><hr /><pre>
Dim str1, lngUBoundX, lngUBoundY
Dim arr1(3), arr3()

arr1(0) = "UPDTD_DT_TM: DATE NULL"
arr1(1) = "NBR: NUMBER(11) NULL"
arr1(2) = "QTR_FLG: VARCHAR2(1) NULL"
arr1(3) = "QTR_FLG: VARCHAR2(1) NULL"

lngUBoundX = UBound(arr1)

For x=0 To UBound(arr1)
str1 = arr1(x)
str1 = Replace(str1, ":", "")
arr2 = Split(str1)

lngUBoundY = UBound(arr2)
ReDim Preserve arr3(lngUBoundX,lngUBoundY)

For y=0 to lngUBoundY
arr3(x,y) = arr2(y)
Next
Next
</pre><hr />
Then you could do whatever you needed to with this array (arr3).

4. ## Re: Split Function

Thank you,it really helped me

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.