Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Split date from one column into 3 separate columns

Hello,

I am trying to split data from one column into 3 separate columns. My data is being loaded from an Oracle database. Following is my script example:

SQL SELECT "column" FROM LOG.TABLE

The data in the column are of the following format:

abc/123/textdescription

How can I separate this into 3 different columns in QV?

Please help.

Thank you in advance.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This will do it:

LOAD [column],

          SubField([column], '/', 1) As Field1,

          SubField([column], '/', 2) As Field2,

          SubField([column], '/', 3) As Field3

;

SQL SELECT [column] FROM LOG.TABLE

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This will do it:

LOAD [column],

          SubField([column], '/', 1) As Field1,

          SubField([column], '/', 2) As Field2,

          SubField([column], '/', 3) As Field3

;

SQL SELECT [column] FROM LOG.TABLE

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thank you. It works perfectly.

Can you also, tell me how to just reload only the current changes that I made in the script and not the entire script?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

It is possible, but how depends on the details of your script. Essentially you use a partial load with ADD and REPLACE load qualifiers. Search here for partial load, or check out the manual.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein