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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Sql error

Hi,

I have the below script and I am getting an "Invalid data type comparison in predicate" error message.

Is anyone able to advise what this issue might be?

Thanks,

Daniel

SQL SELECT cpd.addressid,cpd.addressline1,cpd.addressline2,cpd.addressline3,cpd.addressline4,cpd.cityname,cpd.countryshortname,cpd.managing_site,cpd.partyaddrcountryisocode,cpd.partyaddrcountryname,cpd.partyfulllegalname,cpd.partyid,cpd.partyshortname,cpd.postalcode,cpd.stateid,cpd.statename
FROM crd_tier1.V_CRD_PARTY_DETAIL cpd
left join crd_tier1.V_CIA_MAP_DETAIL cmd on (cmd.srckey1 = cpd.partyid)

3 Replies
Anonymous
Not applicable

Hi Daniel,

Why are you using a left join if you don't use any field from cmd?

Then, the error is because srckey and partyid don't have the same data type to compare them.

I think that you have to use this code:

Select cpd.addressid,

    cpd.addressline1,

    cpd.addressline2,

    cpd.addressline3,

    cpd.addressline4,

    cpd.cityname,

    cpd.countryshortname,

    cpd.managing_site,

    cpd.partyaddrcountryisocode,

    cpd.partyaddrcountryname,

    cpd.partyfulllegalname,

    cpd.partyid,

    cpd.partyshortname,

    cpd.postalcode,

    cpd.stateid,

    cpd.statename

FROM crd_tier1.V_CRD_PARTY_DETAIL cpd

Regards!

danielnevitt
Creator
Creator
Author

Hi Manuel

Thanks for your reply.

I was planning to add the fields after the join was set up correctly.

How can I check if the srckey1 and te partyid have the same data type?

Regards,

Daniel

Anonymous
Not applicable

Hi Daniel,

On the table definition in server.

Regards!!