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! :)
Suthish NairPosted Feb 17, 2011, 3:11 PM
lauren brownPosted Feb 17, 2011, 1:45 AM
Madhu KPosted Feb 17, 2011, 1:22 AM
select STAFF_ID, STAFF_NAME, DEPT_CODE, STAFF_ID+'|| || '+STAFF_NAME as STAFF_INFO from STAFF_DEPARTMENT
Amit ChoudharyPosted Feb 17, 2011, 1:16 AM
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.
lauren brownPosted Feb 17, 2011, 12:57 AM
Madhu KPosted Feb 17, 2011, 12:19 AM
select STAFF_ID, STAFF_NAME, DEPT_CODE, convert(varchar,STAFF_ID)+'|| || '+STAFF_NAME as STAFF_INFO from STAFF_DEPARTMENT