Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I wanna join my views in Qlikview but it shows error "OLEDB read failed" , Even though i wrote them in SQL Server Management Studio and had no problem on it and showed the joined views correctly.
Here is my script :
OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=IT;Initial Catalog=MMTDB;Data Source=192.168.20.22;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=SEPASGOL;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is AAfMXREJUKTaEKNEDG);
Combined:
//-------- Start Multiple Select Statements ------
SQL SELECT
VUnit.Active,
VUnit.State,
VUnit.UnitCode,
VUnit.UnitType,
VUser.father,
VUser.FName,
VUser.Id,
VSick.SickTypeLatinName,
VSick.SickTypeName,
VSick.Skill,
VSick.StartDateCourse,
VSick.Tribe,
VSick.UnitCityId,
VSick.UnitCityName,
VSick.UnitCode,
VSick.UnitName,
VSick.UnitType
FROM
MMTDB.dbo.QVUnit as VUnit,
MMTDB.dbo.QVUser as VUser,
MMTDB.dbo.QVSick as VSick
where VUnit.UnitCode = VUser.UnitCode
and VUnit.UnitCode = VSick.UnitCode;
I would appreciate if anyone can help.
These are possible reasons
1- passing few function in you SQL syntax that are not recognized by the OLEDB.
2- duplicate field names passed
3-Wrong field Names (they may look correct but few unseen charters).
I would suggest try to reduce the query to one filed and add one by one till you get the field that is causing the error for further investigation
Try it in several steps:
1.- Load each of the tables separately
2.- Make the corresponding joins
try to comment the duplicated fields
VSick.UnitCode,
VSick.UnitType
Hi,
See this:
Hi Dear Massimo
I did it but still show the same error
Does it work with one table?
SQL select
VUser.father,
VUser.FName,
VUser.Id
FROM
MMTDB.dbo.QVUser as VUser
yes it works with two tables also but when i add third one it shows error
Try only the third table, if you get the same error remove some fields until there isn't any error
These are possible reasons
1- passing few function in you SQL syntax that are not recognized by the OLEDB.
2- duplicate field names passed
3-Wrong field Names (they may look correct but few unseen charters).
I would suggest try to reduce the query to one filed and add one by one till you get the field that is causing the error for further investigation