Results 1 to 4 of 4

Thread: Online SQL generator Concat operator?

  1. #1
    Join Date
    Mar 2007
    Posts
    2

    Online SQL generator Concat operator?

    Can anyone please tell me why this will not return a concatenated field in the online SQL generator:

    SELECT FirstName+ ' ' +LastName
    FROM Customer;

    I thought this was supposed to combine two colums. I also tried: SELECT City+ ', ' +State+ ' ' + CAST (PostalCode AS CHAR (5))
    FROM Customer;

    and

    SELECT RTRIM (FirstName) & ' ' & LastName
    FROM Customer;

    and

    SELECT CONCAT (FirstName, " ", LastName)
    FROM Customer;


    Thanks!

    SoSadatSQL

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    First two work in sql server. Which rdbms did you use? Got any error?

  3. #3
    Join Date
    Mar 2007
    Posts
    2

    Online SQL Interpreter

    I'm trying to use this online thing that is used for the online course:

    http://sqlcourse.com/cgi-bin/interpreter.cgi

    I have no idea why, none of those options will work.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Don't know what's that, test sql query in rdbms you use.

Posting Permissions

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