Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alfanumerical field

On loading from SQL db an alfanumerical filed with an structure like:

ArticleCode Revenue

35 10

035 12

0035 56

Is taking all as 0035

0035 78

There are three diferent articles,

What am I doing wrong?.

Thanks

7 Replies
prieper
Master II
Master II

Load it with the funtion

TEXT(ArticleCode) AS ArticleCode


Peter

Not applicable
Author

To complete the above answer:

TEXT is a QV function, it will not work in your SQL statement.

So your script should be adapted to something like this:

Articles:

Load
text(ArticleCode) as ArticleCode_temp
;
SQL SELECT
ArticleCode,
FROM <ODBC_NAME>;

I've experienced that when using the TEXT function, the resulting field name cannot be the same as the fieldname you are converting to text, therefore the "_temp" I added. I've had the exact same problem (also with article codes), and this solved the problem. (With a resident load, or when working with QVD files, you can rename the field again in a second load.)

Succes,

Yves

Not applicable
Author

SQL SELECT Abreviatura as Descripcion,

Activo,

Articulo,

Subfamilia,

Familia

FROM "mpFCE001_QlikView".dbo.MpArt;

Lost in your indications

After including your

Load

text(Articulo) as Article;

SQL SELECT Articulo

FROM "mpFCE001_QlikView".dbo.MpArt;

I got the Articulo and Article (alfanunerical as I was aiming)

But in diferent tables

I was aiming for:

SQL SELECT Abreviatura as Descripcion,

Activo,

text(Articulo) as Article Subfamilia,

Familia

FROM "mpFCE001_QlikView".dbo.MpArt;

But this would not work, how can I get arround

Not applicable
Author

Correct would be:

New_QV_table_Name:

LOAD

Abreviatura as Descripcion,

Activo,

text(Articulo) as Article Subfamilia,

Familia;

SQL SELECT

Abreviatura,

Activo,

text(Articulo) as Article Subfamilia,

Familia

FROM "mpFCE001_QlikView".dbo.MpArt;

Not applicable
Author

Thanks for your help

Sadly I still not got succes,

With your last indications I got a SQL error text not a sql

thank again

prieper
Master II
Master II

Should work with


New_QV_table_Name:
LOAD
Abreviatura as Descripcion,
Activo,
text(Articulo) as Article Subfamilia,
Familia;
SQL SELECT
Abreviatura,
Activo,
Articulo,
Familia
FROM "mpFCE001_QlikView".dbo.MpArt;


Peter

Not applicable
Author

Finaly I've got it rigth.

Thanks you all