I have a table like this:
INSERTINTO dbo.GI_CL
(Date,
Index_Code,
Price_Return_Level,
Gross_Total_Return,
Description)
I have another table called: [dbo].[SPGT_Daily]
I want to do something like the following:
INSERTINTO dbo.GI_CL(Date, Index_Code, Price_Return_Level, Gross_Total_Return,Description)
SELECT
[Date Of Index],
[Index Code],
SOMETHING HERE
[Index Name]
FROM [dbo].[SPGT_Daily]
For theSOMETHING HERE part,
INDEX CODE SPGTINFR =Price_Return_Level = 2289.317441
INDEX CODESPGTINTR = Gross_Total_Return = 3763.927172
I have a whole bunch of these for many dates!! It’s like part of the data is pivoted (it took me a while to figure this out). So, one table is normal, and the other table is not normal at all.
Here's an image of what I'm dealing with:
Can someone give me some guidance as to how to handle this? I’m sure it’s possible, but I’m not sure how to execute this task.
Thanks to all.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.