Try the cast or convert, I have an exmple listed below.
SELECT d.intPlayerId,
p.vcPlayerName,
count(*) as numberofgames,
convert(numeric(10,2),
sum(d.intRank)) AS rank,
sum(convert(numeric(6,2),d.intKills)) AS kills...
Angle and Tohomas,
Thank you for trying, I am thinking that I need to dump reults into a temp table. Once I have the results in the temp table, then I need to group them and insert them into another temp table or view. Thus, I would have all answers for a user in one row. Would using a...
Thomas,
Thanks for the idea, but I have run into a couple problems. The following is my code
SELECT I_SRVY_USER_ID,
CASE N_SRVY_ACTUAL_NUM WHEN '1' THEN N_SRVY_ANSWER ELSE 0 END AS 'Q1',
CASE N_SRVY_ACTUAL_NUM WHEN '2' THEN N_SRVY_ANSWER ELSE 0 END AS 'Q2',
CASE N_SRVY_ACTUAL_NUM WHEN '3'...
Ok, I am at a loose here, can someone help?
I have some data in a table which looks like this;
UserID Question Answer
68 1 2
68 2 3
68 3 Yes
69 1 3
69 2 2
69 3 No
The UserID...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.