Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Seperate Tables From one ODBC Connection

First Post !!

I am trying to load two tables from one ODBC connection. When I run each table individually it works fine. But when I try loading them together I get an error message.

I figured it may be because there are common column names in both tables. So to combat this I renamed the columns in one of the tables. This didn't wok and I get the same error message.

Error Message.png

See Load Script below............

ODBC CONNECT TO DataSummary;

Load *

;

     SQL Select *

     From im_reporting_zone.dbo.Analysis_J_Test;

Load

     CustomerID as F.CustomerID,

     HistoryDate as F.HistoryDate,

     MonthYear as F.MonthYear,

     FleetSizeTotal_Count as F.FleetSizeTotal_Count,

     FleetSizeCar_Count as F.FleetSizeCar_Count,

     FleetSizeComercial_Count as F.FleetSizeComercial_Count,

     FleetSizeVan_Count as F.FleetSizeVan_Count,

     FleetSizeMotorbike_Count as F.FleetSizeMotorbike_Count,

     Intermediary as F.Intermediary,

     Group as F.Group,

     Company as F.Company,

     Branch as F.Branch,

     CostCentre as F.CostCentre,

     NatureOfBusiness as F.NatureOfBusiness

;

SQL Select *

From im_reporting_zone.dbo.Analysis_J_FleetSizebyMonthEnd

2 Replies
Not applicable
Author

Anybody?

hic
Former Employee
Former Employee

It is impossible to say what goes wrong, since we do not have the database here. But - there should be no problem whatsoever loading several tables using one single connection.

I would delete the script and generate it from scratch again - without renaming anything. Aim for something like the following:

ODBC CONNECT TO DataSummary;

First 100

SQL Select * From im_reporting_zone.dbo.Analysis_J_Test;

First 100

SQL Select * From im_reporting_zone.dbo.Analysis_J_FleetSizebyMonthEnd;

That is, as simple as possible. Just two tables and just 100 records from each. Then you can look for errors or synthetic keys, or other fields that needs to be renamed.

HIC