我試圖將以下查詢從基於SQL Server的代碼轉換爲TERADATA代碼。Teradata等效於UNPIVOT並從SQL SERVER搜索
INSERT INTO #Keyword(Keyword,OmnitureHitsID,Hit_Time_GMT)
SELECT Search, @PrvRowIdentity,Hit_Time_GMT
FROM
(SELECT
Evar02_Search
, Hit_Time_GMT
, Evar11_End_Keyword
, Evar14_End_SrchTrmPassed
, Post_Evar02
, Post_Evar11
, Post_Evar14
FROM #MaINTable WHERE ID = @i
AND Visid_High [email protected]_High) p
UNPIVOT
(SEARCH FOR SearchKeyword IN
(Evar02_Search
, Evar11_End_Keyword
, Evar14_End_SrchTrmPassed
, Post_Evar02
, Post_Evar11
, Post_Evar14)
) AS unpvt;
誰能告訴我如何在UNPIVOT後轉換零件。其實我不確定SEARCH FOR SearchKeyword IN
部件是做什麼的。
任何幫助表示讚賞:)