Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Split date from one column into 3 separate columns

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
3 Replies
MVP
MVP

Re: Split date from one column into 3 separate columns

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

Re: Split date from one column into 3 separate columns

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?

MVP
MVP

Re: Split date from one column into 3 separate columns

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
Community Browser