i have got a table as follows Y2002 funder fmis_code client_nhi Servcie_id year jan feb mar dec azx 1223 4444 44 2002 12 23.4 24......55 columns jan , feb.. etc contain the units(amounts) for different months this table has got about a million rows now i wanted to convert the columns into rows and i used the following query SELECT Funder, [FMIS Code], [Service ID], [Client NHI], Year, ' November' AS Month, Nov AS units FROM Y2002 UNION ALL SELECT Funder, [FMIS Code], [Service ID], [Client NHI], Year, ' December' AS Month, Dec FROM Y2002 when i ran this query in sql 2005, it gave em the out of memory exception.. what shall i do????
First you should post this under SQL Server 2005 topics. what is the exact error you are getting. Did you install SQL Server 2005 Sp1 ---------------------------------------- http://dineshasanka.blogspot.com/
Have you tested & applied service pack on SQL? Also check on event viewer for any other information, try executing the same on another SQL 2005 instance (if possible). Satya SKJ Microsoft SQL Server MVP Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided �AS IS� with no rights for the sake of knowledge sharing.