Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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!!