Click here to Skip to main content
15,910,130 members
Home / Discussions / Database
   

Database

 
GeneralRe: Changing CommandText changes Parameters Pin
PIEBALDconsult13-Sep-10 17:31
mvePIEBALDconsult13-Sep-10 17:31 
AnswerRe: Changing CommandText changes Parameters Pin
Mycroft Holmes12-Sep-10 12:10
professionalMycroft Holmes12-Sep-10 12:10 
GeneralRe: Changing CommandText changes Parameters Pin
Trevortni13-Sep-10 10:54
Trevortni13-Sep-10 10:54 
GeneralRe: Changing CommandText changes Parameters Pin
Mycroft Holmes13-Sep-10 12:25
professionalMycroft Holmes13-Sep-10 12:25 
GeneralRe: Changing CommandText changes Parameters Pin
PIEBALDconsult13-Sep-10 17:36
mvePIEBALDconsult13-Sep-10 17:36 
GeneralRe: Changing CommandText changes Parameters Pin
Mycroft Holmes13-Sep-10 17:45
professionalMycroft Holmes13-Sep-10 17:45 
GeneralRe: Changing CommandText changes Parameters Pin
PIEBALDconsult13-Sep-10 18:01
mvePIEBALDconsult13-Sep-10 18:01 
QuestionProblem with a T-SQL 2005 PIVOT Pin
Steven J Jowett10-Sep-10 0:14
Steven J Jowett10-Sep-10 0:14 
I am trying to run the following query on a MS SQL Server 2005 Express.

SELECT * FROM 
(
	SELECT * FROM vuWeighTicketReport 
	WHERE [TicketDate] >= '2010-09-10' 
) AS TicketData PIVOT (
	SUM(ProductWeight) FOR ProductCode IN (
		[Blood],[Bonecake],[Carcass],[CFat],[Desiel],[DMeal],[Feather],[FMeal],
		[Greaves],[Head],[Misc],[Offal],[PBlend],[PFB],[PMeal],[Skin],[Slurry],
		[Tail],[Tallow],[TBottom],[Thigh],[TMeal],[Wash]
	)
) 


SQL Managment Studio tells me there is an error near ')'
I know the error is after the PIVOT statement, but what the actual problem is, I don't know.

I would be very grateful if someone could point my mistake out to me.

Thanks
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.

AnswerRe: Problem with a T-SQL 2005 PIVOT Pin
Simon_Whale10-Sep-10 1:05
Simon_Whale10-Sep-10 1:05 
GeneralRe: Problem with a T-SQL 2005 PIVOT Pin
Steven J Jowett10-Sep-10 1:35
Steven J Jowett10-Sep-10 1:35 
QuestionSQL Syntax request...Please Help... Pin
new_phoenix9-Sep-10 12:21
new_phoenix9-Sep-10 12:21 
AnswerRe: SQL Syntax request...Please Help... Pin
Luc Pattyn9-Sep-10 13:51
sitebuilderLuc Pattyn9-Sep-10 13:51 
AnswerRe: SQL Syntax request...Please Help... Pin
PIEBALDconsult9-Sep-10 14:19
mvePIEBALDconsult9-Sep-10 14:19 
GeneralRe: SQL Syntax request...Please Help... Pin
Davewjones9-Sep-10 15:47
Davewjones9-Sep-10 15:47 
GeneralRe: SQL Syntax request...Please Help... Pin
David Skelly10-Sep-10 3:47
David Skelly10-Sep-10 3:47 
GeneralRe: SQL Syntax request...Please Help... Pin
J4amieC10-Sep-10 5:36
J4amieC10-Sep-10 5:36 
GeneralRe: SQL Syntax request...Please Help... Pin
PIEBALDconsult11-Sep-10 15:49
mvePIEBALDconsult11-Sep-10 15:49 
Questionremote connection sql express 2008 Pin
mersad009-Sep-10 10:50
mersad009-Sep-10 10:50 
AnswerRe: remote connection sql express 2008 Pin
Eddy Vluggen10-Sep-10 1:08
professionalEddy Vluggen10-Sep-10 1:08 
QuestionRe: remote connection sql express 2008 Pin
mersad0010-Sep-10 10:45
mersad0010-Sep-10 10:45 
JokeRe: remote connection sql express 2008 Pin
mersad0010-Sep-10 10:51
mersad0010-Sep-10 10:51 
QuestionRecover SSIS file Pin
parth.p9-Sep-10 6:31
parth.p9-Sep-10 6:31 
QuestionAbout the datatype size Pin
Dhyanga9-Sep-10 3:08
Dhyanga9-Sep-10 3:08 
AnswerRe: About the datatype size Pin
PIEBALDconsult9-Sep-10 4:19
mvePIEBALDconsult9-Sep-10 4:19 
GeneralRe: About the datatype size Pin
Dhyanga9-Sep-10 5:29
Dhyanga9-Sep-10 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.