Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
danielnevitt
Contributor

Joining tables

Hi,

I am trying to join two tables together.  The field in table 1 is type SQL Numeric (2) and the field in table 2 is SQL Varchar (12).

How can I standardise them in order to  be able to join?

Thanks,

Daniel

6 Replies
prma7799
Honored Contributor III

Re: Joining tables

You can change datatype .....

or please share some data...

danielnevitt
Contributor

Re: Joining tables

Thanks for the reply.

How can I change the data type?

RECEIVE_PARTY_NO is SQL Numeric and TGTKEY1 is SQL Varchar

Regards,

Daniel

prma7799
Honored Contributor III

Re: Joining tables

Load

RECEIVE_PARTY_NO ,

Num(TGTKEY1) as TGTKEY1

from .....



Or  please send some that for more idea....

prieper
Honored Contributor II

Re: Joining tables

You may add preceding LOAD to the SQL-Command, giving you the chance to use all QV-formulas and -expressions,like:

Table1:

LOAD

*,

NUM(Keyfield, '000000000')                    AS %Key;

SQL SELECT * ......

And similar with the other table.

Peter

Highlighted
nadeemsmarty
Valued Contributor

Re: Joining tables

Hi ,

Create a qvd of the tables ,Since qlikview has only two datatypes(numeric, text) Make both of the numeric and then perform a join or a link between the tables .

Regards,

Nadeem

danielnevitt
Contributor

Re: Joining tables

Thank for the replies.  The solution I opted for was:

(convert(varchar,bi.RECEIVE_PARTY_NO) = cm.TGTKEY1)

Regards,

Daniel