Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Arrays in Transact SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-06 : 17:30:10
Homer writes "Is there a way to implement arrays in T-SQL? I have read that there is not. I want to use arrays instead of using CASE statements like the following:

SELECT
CASE FieldValue
WHEN '1' THEN 1.1
WHEN '2' THEN 1.2
WHEN '3' THEN 3.2
WHEN '4' THEN 4.7
END AS Something
FROM SomeTable

Can't I use

SELECT
MyArray(FieldValue) AS Something
FROM SomeTable

or something like that?"
   

- Advertisement -