Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2012
    Posts
    15

    Unanswered: Concatenation of two coloums

    As I see in oracle,

    select last_name || job_id as "employees" from employees;

    If I execute this in oracle

    the result will be

    Employees
    1 AbeISA_REP
    2 DavieST_CLERK
    3 De HannAD_VP
    4 ErnstIT_PROG

    In the above exaple, LAST_NAME and JOB_ID are concatenated, and they are given the alias EMployees.

    In sybase, how can we execute this?

  2. #2
    Join Date
    May 2006
    Posts
    17
    see examples down:

    select last_name + convert(varchar(10),job_id) as "employees" from employees
    go
    select 'AAAAA'+convert(varchar(10),123.45)
    go

  3. #3
    Join Date
    Jun 2011
    Posts
    28
    I beleive that you need somethingg like this

    select employes=last_name +"_"+job_id from employees

    Regards

  4. #4
    Join Date
    Jun 2012
    Posts
    15
    tan x a lot guys....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •