#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Query help for combining two fields


    For SQL Server compact I can use this SQL
    Code:
    SELECT *, (FIRST_NAME + LAST_NAME) As FULL_NAME FROM EMPLOYEES
    How do you write this for Firebird SQL?

    I am using Firebird + VB.NET
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by ZmrAbdulla
    For SQL Server compact I can use this SQL
    Code:
    SELECT *, (FIRST_NAME + LAST_NAME) As FULL_NAME FROM EMPLOYEES
    How do you write this for Firebird SQL?

    I am using Firebird + VB.NET
    Code:
    SELECT *, (FIRST_NAME || LAST_NAME) As FULL_NAME FROM EMPLOYEES.
    with space between the names
    Code:
    SELECT *, (FIRST_NAME || ' ' || LAST_NAME) As FULL_NAME FROM EMPLOYEES
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0
    Thanks mirCata,
    I found the vertical bar joiner in one of the thread. Still I am unable to use the *, in the SQL.
    Only possibility to define all the columns like
    Code:
    SELECT FIRST_NAME , LAST_NAME , TELEPHONE, (FIRST_NAME + LAST_NAME) As FULL_NAME FROM EMPLOYEES
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by ZmrAbdulla
    Thanks mirCata,
    I found the vertical bar joiner in one of the thread. Still I am unable to use the *, in the SQL.
    Only possibility to define all the columns like
    Code:
    SELECT FIRST_NAME , LAST_NAME , TELEPHONE, (FIRST_NAME + LAST_NAME) As FULL_NAME FROM EMPLOYEES
    Code:
    EMPLOYEES.*

    Comments on this post

    • ZmrAbdulla agrees
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0
    Thanks it worked.

IMN logo majestic logo threadwatch logo seochat tools logo