Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an issue, i have a simple SQL select script, extracting about 16m rows of data.
If i select only one row of data, everything is OK. If I select the entire contents of the database, I get corrupt results with missing leading zeros, spaces added randomly, etc.
Any idea why this happens?
Solved it.
Changed my code into:
OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=False;User ID=xxxxxx;Data Source=xxxxxx;Extended Properties="DSN=xxxxxxx;SERVER=xxxxxx;PORT=xxxxx;DATABASE=xxxxxxx;AUTHENTICATION METHOD=0;UID=xxxxxxx;STATIC CURSORS=0;QUERY TIMEOUT=1;UNICODE SQLTYPES=0"];
LOAD
Text(ArtNR),
Text(ProdNR);
SELECT
MDB.ArtNR,
MDB.ProdNR
FROM MainDatabase MDB;
All loads OK Now.
can you post your code?
you could add RTRIM() and LTRIM() to fields with leading and trailing spaces.
REPLACE() works well to replace characters in the string.
Where is SQL Server located, is it on same network from where you are extracting?
Does QlikView connection fails at the end?
What do you mean that? What is the key of random numbers. Can you elaborate more
Hi, sorry for the late reply, been out of town!
The extract script is very simple, something like this:
OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=False;User ID=xxxxxx;Data Source=xxxxxx;Extended Properties="DSN=xxxxxxx;SERVER=xxxxxx;PORT=xxxxx;DATABASE=xxxxxxx;AUTHENTICATION METHOD=0;UID=xxxxxxx;STATIC CURSORS=0;QUERY TIMEOUT=1;UNICODE SQLTYPES=0"];
SELECT
MDB.ArtNR,
MDB.ProdNR
FROM MainDatabase MDB;
The normal output should be:
ArtNR | ProdNR |
---|---|
02311 | 02311 |
08522 | 08522 |
Instead I get:
ArtNR | ProdNR |
---|---|
2311 | 231 1 |
8522 | 852 2 |
I repeat, this problem does not occur if I select just one ArtNR at a time.
The server I am querying is on the same network.
Tried it already.. Doesn`t work.
Solved it.
Changed my code into:
OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=False;User ID=xxxxxx;Data Source=xxxxxx;Extended Properties="DSN=xxxxxxx;SERVER=xxxxxx;PORT=xxxxx;DATABASE=xxxxxxx;AUTHENTICATION METHOD=0;UID=xxxxxxx;STATIC CURSORS=0;QUERY TIMEOUT=1;UNICODE SQLTYPES=0"];
LOAD
Text(ArtNR),
Text(ProdNR);
SELECT
MDB.ArtNR,
MDB.ProdNR
FROM MainDatabase MDB;
All loads OK Now.