Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi at all,
I have loaded a table from a database called "PORDINE", in this table there is a field called "VARIANTI" in which there is indicated the dimension of different objects in this format: "VDIM=340~1200~28".
So i created another table from this one with only this field and then i would like to create three new fields with the three different dimension: DIM_01 = 340, DIM_02 = 1200 and DIM_03 = 28.
I created a formula that does this job (i tried in the qlik application in a straight table) and i would like to add in the script in order to create the dimensions, but the script doesn't works.
Varianti:
SQL Select
VARIANTI,
IF(Left(VARIANTI,4) = 'VDIM',SubField(purgechar ( VARIANTI,'VDIM=' ),'~',3),'') as DIM_03
From dbo.PORDINE;
The error message is the follow:
ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Incorrect syntax near ','.
Anyone has an idea about how to fix it?
Andrea
Sorry can you close the Preceding Load with semicolon like here
Varianti:
LOAD VARIANTI,
IF(Left(VARIANTI,4) = 'VDIM',SubField(purgechar ( VARIANTI,'VDIM=' ),'~',3),'') as DIM_03;
SQL Select
VARIANTI
From dbo.PORDINE;
Try this:
Varianti:
LOAD VARIANTI,
IF(Left(VARIANTI,4) = 'VDIM',SubField(purgechar ( VARIANTI,'VDIM=' ),'~',3),'') as DIM_03
SQL Select
VARIANTI
From dbo.PORDINE;
Hi Vishwarath
It give to me an error in the second part
Varianti:
LOAD VARIANTI,
IF(Left(VARIANTI,4) = 'VDIM',SubField(purgechar ( VARIANTI,'VDIM=' ),'~',3),'') as DIM_03
SQL Select
VARIANTI
From dbo.PORDINE;
Sorry can you close the Preceding Load with semicolon like here
Varianti:
LOAD VARIANTI,
IF(Left(VARIANTI,4) = 'VDIM',SubField(purgechar ( VARIANTI,'VDIM=' ),'~',3),'') as DIM_03;
SQL Select
VARIANTI
From dbo.PORDINE;