Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

database values ​​do not coincide with qlikview values

Hello

I have a field (id_Personal) with values ​​08, 06, 03 to pass to qlikview I get 8,006,003.

Use the following syntax:
OLEDB CONNECT TO [Provider = SQLOLEDB.1; Persist Security Info = True; User ID = qlikview; Initial Catalog = Storage, Data Source = melodepo; Use Procedure for Prepare = 1; Auto Translate = True; Packet Size = 4096; Workstation ID = SRVQLIKVIEW; Use Encryption for Data = False; Tag with column collation When possible = False] (XPassword is OKNSdQRMNLaADbEGQRPB);

LOAD "Id_Compania"
     "Fecha_Transaccion", "Id_Personal"
     EmpCod;
SQL SELECT *
FROM Deposito.dbo. "Historico_Movimiento_Encab"
Where year (Fecha_Transaccion)> = 2013;

how to make passes exactly the same values​​.

Please help,

Rolando

1 Solution

Accepted Solutions
danielrozental
Honored Contributor II

Re: database values ​​do not coincide with qlikview values

Values are being interpreted as numbers by qlikview. You should force the value to be read as text.

LOAD "Id_Compania"

     "Fecha_Transaccion",

     text("Id_Personal") AS Id_Personal,

     EmpCod;

SQL SELECT *

FROM Deposito.dbo. "Historico_Movimiento_Encab"

Where year (Fecha_Transaccion)> = 2013;

12 Replies
nilesh_gangurde
Valued Contributor

Re: database values ​​do not coincide with qlikview values

the above syntax for the select query will give error.

instaed of that you fetch all the data from data base and then apply filter(i.e. where condition)

then your script will be.

TEMP:

SQL SELECT *

FROM Deposito.dbo. "Historico_Movimiento_Encab";

TEMP2:

load

"Id_Compania"

     "Fecha_Transaccion", "Id_Personal"

     EmpCod

resident TEMP

Where year (Fecha_Transaccion)> = 2013;

Drop table TEMP;

-Nilesh

Not applicable

Re: database values ​​do not coincide with qlikview values

I keep sending the same values:

08 - 008

06 - 006

help me

Not applicable

Re: database values ​​do not coincide with qlikview values

In your load statement, use the text() function as shown below to let QV grab all variances of numeric values as text:

text(Id_Personal) as Id_Personal,

Not applicable

Re: database values ​​do not coincide with qlikview values

Different values in an original database and in qvd - why?

Not applicable

Re: database values ​​do not coincide with qlikview values

when shifting out

008 instead of 08,

003 instead of 03.

006 instead of 06


because that happens if copied directly from a database

danielrozental
Honored Contributor II

Re: database values ​​do not coincide with qlikview values

Values are being interpreted as numbers by qlikview. You should force the value to be read as text.

LOAD "Id_Compania"

     "Fecha_Transaccion",

     text("Id_Personal") AS Id_Personal,

     EmpCod;

SQL SELECT *

FROM Deposito.dbo. "Historico_Movimiento_Encab"

Where year (Fecha_Transaccion)> = 2013;

er_mohit
Honored Contributor II

Re: database values ​​do not coincide with qlikview values

use  field in [] bracket  like this

[ "Id_Compania"]

    [ "Fecha_Transaccion"], text([ "Id_Personal"])as [ "Id_Personal"]

hope it helps

Not applicable

Re: database values ​​do not coincide with qlikview values

hello

to use [] does not recognize fields

help me

Employee
Employee

Re: database values ​​do not coincide with qlikview values

Try

LOAD "Id_Compania"

     "Fecha_Transaccion",

     num("Id_Personal",'00') as Id_Personal, // Or 000 if you want 3 digits

     EmpCod;

SQL SELECT *

FROM Deposito.dbo. "Historico_Movimiento_Encab"

Where year (Fecha_Transaccion)> = 2013;


Community Browser