Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master II
Master II

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;

View solution in original post

12 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

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
Author

I keep sending the same values:

08 - 008

06 - 006

help me

Not applicable
Author

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
Author

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

Not applicable
Author

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
Master II
Master II

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
Master II
Master II

use  field in [] bracket  like this

[ "Id_Compania"]

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

hope it helps

Not applicable
Author

hello

to use [] does not recognize fields

help me

Clever_Anjos
Employee
Employee

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;