Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

not all records are getting loaded into the qlikview from sql server

Hi All,

I am trying to load 65 million records from a sql server into the qlikview but only 33 million is getting loaded. We have a unique id for all the records in the table.

When i try to query it in the sql server management studio the number of records are showing correctly. Can anyone help me please?

Thanks.

3 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

Suprasanna,


What is the query you have written in qvw? Please share your script.

Not applicable
Author

thanks for the response.

<script>

Main:

SQL Select  t1.*,

Location_type= (Case when t1.[Location Type (HQ, Branch, Single Location)] = '0' then 'Single Location'

when t1.[Location Type (HQ, Branch, Single Location)]='1' then 'HQ'

when t1.[Location Type (HQ, Branch, Single Location)]='2' then 'Branch' end),n.[Naics Description]

from (SELECT  [CVMID],[Duns Number],[Company Name],[Physical Street Address],[Physical City],[Physical State/Province],[Physical Zip Code],[Physical Country],[Mailing Street Address],[Mailing City],[Mailing State/Province],

[Mailing Zip Code],[Mailing Country],[Telephone Number],[Location Type (HQ, Branch, Single Location)],[SIC1],[SIC2],[SIC3],[SIC4],[SIC5],[SIC6],[Headquarter/Parent Duns],[Domestic Ult Duns],[Global Ult Duns],

[FEIN Number],[Headquarter/Parent Name],[Headquarter/Parent Address],[Headquarter/Parent City],[Headquarter/Parent State/Province],[Headquarter/Parent Postal Code],[Headquarter/Parent Country],[Domestic Ultimate Name],

[Domestic Ultimate Address],[Domestic Ultimate City],[Domestic Ultimate State/Province],[Domestic Ultimate Postal Code],[Domestic Ultimate Country],[Global Ultimate Name],[Global Ultimate Address],[Global Ultimate City],[Global Ultimate State/Province],[Global Ultimate Postal Code],

[Global Ultimate Country],[NAICS Code],[Sales] ,NaicsCode=substring([NAICS Code],1,2) from  dbo.DnBUSA )t1 left join  NAICS n on t1.NaicsCode=n.[Naics Code];

</script>

jagannalla
Partner - Specialist III
Partner - Specialist III

IF you run this query in sql whether you can able to get full records?

Ok  use this ;

Main:

Load *;

SQL Select  t1.*,

Location_type= (Case when t1.[Location Type (HQ, Branch, Single Location)] = '0' then 'Single Location'

when t1.[Location Type (HQ, Branch, Single Location)]='1' then 'HQ'

when t1.[Location Type (HQ, Branch, Single Location)]='2' then 'Branch' end),n.[Naics Description]

from (SELECT  [CVMID],[Duns Number],[Company Name],[Physical Street Address],[Physical City],[Physical State/Province],[Physical Zip Code],[Physical Country],[Mailing Street Address],[Mailing City],[Mailing State/Province],

[Mailing Zip Code],[Mailing Country],[Telephone Number],[Location Type (HQ, Branch, Single Location)],[SIC1],[SIC2],[SIC3],[SIC4],[SIC5],[SIC6],[Headquarter/Parent Duns],[Domestic Ult Duns],[Global Ult Duns],

[FEIN Number],[Headquarter/Parent Name],[Headquarter/Parent Address],[Headquarter/Parent City],[Headquarter/Parent State/Province],[Headquarter/Parent Postal Code],[Headquarter/Parent Country],[Domestic Ultimate Name],

[Domestic Ultimate Address],[Domestic Ultimate City],[Domestic Ultimate State/Province],[Domestic Ultimate Postal Code],[Domestic Ultimate Country],[Global Ultimate Name],[Global Ultimate Address],[Global Ultimate City],[Global Ultimate State/Province],[Global Ultimate Postal Code],

[Global Ultimate Country],[NAICS Code],[Sales] ,NaicsCode=substring([NAICS Code],1,2) from  dbo.DnBUSA )t1 left join  NAICS n on t1.NaicsCode=n.[Naics Code];