Hi,
I have problem with pivot table - I need to load column with shifts - on the SQL server I have data A, B, C, 4. In database the column is varchar/string. But the Query in Excel loads the data as Integer. But I didn't found the key, how it is converted. Sometimes is A 1, sometimes 3.
I tried to convert it in SQL definition with CASE.
It works, but it only convert the wrong values - sometimes 1 - exactly to A, and 3 to C.shift=
(SELECT
CASE
WHEN TabPrikazMzdyAZmetky_EXT._shift=1 THEN 'A'
WHEN TabPrikazMzdyAZmetky_EXT._shift=2 THEN 'B'
WHEN TabPrikazMzdyAZmetky_EXT._shift=3 THEN 'C'
WHEN TabPrikazMzdyAZmetky_EXT._shift=4 THEN 'D'
END)
Any idea how to load data from SQL directly as STRING?
Thank You very much.
Martin
Bookmarks