Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    5

    Unanswered: Putting commas between select statement values

    Hello,

    This may be a strange request, but I am going to ask about it anyways.

    Say for example if I have a table named TEST and in the table there is a column named NUMBERS, such that it is like this:

    NUMBERS
    1
    2
    3
    4

    How could I use a select statement in a way that a comma would seperate every return value, such that if I go 'Select NUMBERS from TEST' I would get:

    1,2,3,4

    Instead of:

    1
    2
    3
    4

    Any ideas?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    123
    The numbers will still be as o column... but try:

    SELECT CAST(numbers as varchar)+',' from TEST

Posting Permissions

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