Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Joining fields from SQL database

How can I connect 2 fields like "name" and "surname" to "full name" coming from an sql database?

6 Replies
MVP
MVP

Re: Joining fields from SQL database

load

     name,

     surname,

     name & ' ' & surname as [full name]

     ;

sql select

     name,

     surname

from

     yourtableinsqldatabase

     ;

Re: Joining fields from SQL database

If both field are in the same table then:

SELECT

     ...

     Name & ' ' & surname as completeName

      ....

From

     ....

Not applicable

Re: Joining fields from SQL database

ok, thank you . so you have to insert the merge command before loading the data from the sql databse?

mov
Esteemed Contributor III

Re: Joining fields from SQL database

You can do it in SQL directly as well:

sql select

     name,

     surname

     name + ' ' + surname as FullName

from ...

MVP
MVP

Re: Joining fields from SQL database

there are different ways

- only sql side (Michael, Alessandro)

- mixed (sql + qlik) with concat in sql

- mixed with concat in qlik (Massimo)

.more here

http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load

Not applicable

Re: Joining fields from SQL database

Perfect! Thank you

Community Browser