Results 1 to 3 of 3

Thread: variable variables

  1. #1
    Join Date
    Sep 2004
    Posts
    34

    variable variables

    Is there any way in SQL to create a variable amount of variables, or more importantly, a variable number of columns.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    SQL Server (or any DBMS) does not support variable number of columns.

    Why do you need variable number of columns in a table?.

    You can store variable column data in rows and pivot the table to get results later.

  3. #3
    Join Date
    Sep 2004
    Posts
    34
    This in order to convert rows into columns, and although I can do it with a set number of rows, I need to be able to do it with any number of rows (obivously not exceeding the 255 or 256 column limit)

Posting Permissions

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