Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
After reading some other threads on here and trying things out, I am still stuck!! Any idea where I'm going wrong??
ORDER BYCASE @order WHEN 'ASC' THENCASE@criteriaWHEN 'enw' THEN provider_idWHEN 'tref' THEN provider_town WHEN 'math' THEN pdtype_type_id ENDEND ASC,CASE @order WHEN 'DESC' THENCASE @criteriaWHEN 'enw' THEN provider_idWHEN 'tref' THEN provider_townWHEN 'math' THEN pdtype_type_idENDEND DESC
LarsG
Constraint Violating Yak Guru
284 Posts
Posted - 2004-05-21 : 07:27:08
What's the problem?apart from the missing space in this CASE@criteria