Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

SQL Topic

How convert 20k sal into 20,000 in sql server

7 Replies
Creator III
Creator III

You can use the SQL replace function

SELECT REPLACE('20k', 'k', ',000');

or

SELECT REPLACE('20k sal', 'k sal', ',000');

Contributor III
Contributor III

sal is column name

actualdata          requirment

sal                    sal

20k                    20,000

10k                    10,000

12k                    12,000

Creator III
Creator III

SELECT REPLACE(sal, 'k', ',000') as sal from table1

Specialist
Specialist

Re: SQL Topic

srinu qvdApprentice

Contributor III
Contributor III

no i did't get it

Specialist
Specialist

Use following in your load script in qlikview or sense:


load REPLACE(sal, 'k', '000') as sal from database.tablename

Specialist
Specialist

Hi, srinu:

1- option:

LOAD *, KeepChar(sal,'0123456789')*1000 as FieldSal;
LOAD * Inline
[
sal
10k
20k
30k
]
;

salry.png