Hi experts,
I would like to add a lot of spaces in between my concatenate sql statement, "STAFF_ID || ' ' || STAFF_NAME AS STAFF_INFO". Would you be able to teach me how to do that?
"SELECT STAFF_ID, STAFF_NAME, DEPT_CODE, STAFF_ID || ' ' || STAFF_NAME AS STAFF_INFO FROM STAFF_DEPARTMENT WHERE STAFF_ID LIKE '%" + Searcht + "%' OR STAFF_NAME LIKE '%" + Searcht + "%' ORDER BY STAFF_ID ASC";
Thanks a million! :)

Madhu KRank #1,514 · 1.1K reputationPosted Feb 16, 2011, 7:19 PM EST
select STAFF_ID, STAFF_NAME, DEPT_CODE, convert(varchar,STAFF_ID)+'|| || '+STAFF_NAME as STAFF_INFO from STAFF_DEPARTMENT
lauren brown33 reputationPosted Feb 16, 2011, 7:57 PM EST
Amit ChoudharyRank #145 · 15.8K reputationPosted Feb 16, 2011, 8:16 PM EST
Why do you want to place the spaces in concatenation.. if you are using this query in reports then you can place the spaces in your presentation side.
Madhu KRank #1,514 · 1.1K reputationPosted Feb 16, 2011, 8:22 PM EST
select STAFF_ID, STAFF_NAME, DEPT_CODE, STAFF_ID+'|| || '+STAFF_NAME as STAFF_INFO from STAFF_DEPARTMENT
lauren brown33 reputationPosted Feb 16, 2011, 8:45 PM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 17, 2011, 10:11 AM EST