G
Guest
I have a table in which each department is set up as a
column and so I have 12-15 columns in my table. I am
trying to decrease the number of columns and am
storing "department name" as a column. I have the
following code working...
INSERT INTO [Data] ( Acc, dept, Amount )
SELECT [Data1].[AC-ID], "Acct" AS Expr1, [Data1].[ACCT]
FROM [Data1];
I was wondering if there is a simpler way of converting
all the columns instead of running similar code as above
for all the columns. Can I replace "Acct" (string vlaue)
and [ACCT] (heading of a clumn) with variables?
Thanks
column and so I have 12-15 columns in my table. I am
trying to decrease the number of columns and am
storing "department name" as a column. I have the
following code working...
INSERT INTO [Data] ( Acc, dept, Amount )
SELECT [Data1].[AC-ID], "Acct" AS Expr1, [Data1].[ACCT]
FROM [Data1];
I was wondering if there is a simpler way of converting
all the columns instead of running similar code as above
for all the columns. Can I replace "Acct" (string vlaue)
and [ACCT] (heading of a clumn) with variables?
Thanks