Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Ronald
Contributor III
Contributor III

SQL Select field not found

Hi,

In my script in load show the error Field BU not found

Panel:
LOAD
BU,
TEAM_ID,
FUERZA,
GD_ALIGNMENT_ID,
ALIGNMENT_ID,
ALIGNMENT_NAME,
CUSTOMER_ID,
CUSTOMER_TYPE,
"CUSTOMER_ID_V",
"FECHA_VISITA";

SQL
SELECT
BU,
H."TEAM_ID",
H.FUERZA,
H."GD_ALIGNMENT_ID",
H."ALIGNMENT_ID",
H."ALIGNMENT_NAME",
H."CUSTOMER_ID",
H."CUSTOMER_TYPE",
V."CUSTOMER_ID" as "CUSTOMER_ID_V",
V."FECHA_VISITA"
FROM PDMS.dbo."HIS_PANEL_COL" H
left join PDM.dbo."CONTEO_VISITAS_ROI" V
on
H."BUSINESS_UNIT"=V.BU and H.FUERZA=V.FUERZA and H."ALIGNMENT_ID"=V."REP_ALIGNMENT_ID" and H."CUSTOMER_ID"=V."CUSTOMER_ID"

;

Labels (1)
3 Replies
Or
MVP
MVP

If you're getting an SQL error, it sounds like you need to check your SQL, then? Perhaps the BU field needs to be preceded with the table name (V.BU)?

If the issue is with the load statement, try Load *; instead and see if that pulls the BU field or not.

Ronald
Contributor III
Contributor III
Author

I have tried both tables separatly: PDMS.dbo. "HIS_PANEL_COL" and
PDM.dbo. "CONTEO_VISITAS_ROI"
and they work perfectly; but when I try to use left join:
PDMS.dbo. "HIS_PANEL_COL" H
left join PDM.dbo. "COUNTY_VISITAS_ROI" that error occurs.
I also tried load * and it doesn't work; H.BU and it doesn't work

Or
MVP
MVP

Unfortunately, your SQL query is not something I can help you with, since I have no idea what your database structure is. You'll need to discuss this with someone who knows the database and can troubleshoot specific queries related to it. Once you have the query working against your database, if you encounter any Qlik problems, perhaps we can help you with those!