• Home
  • Blog
  • Resume
  • Contact
  • Projects
  • Gallery
  • Amit’s Resume
  • About Nagpur
KEEP IN TOUCH

Microsoft query in Excel and Case statement

Apr15
2010
Leave a Comment Written by admin

It is frustrating that I need to pull the data from SQL server using complex queries and then format it in Excel to ”prettify” the data. Thankfully, I can use the Microsoft query in Excel to get the data from SQL server and create a table or a PivotTable. Today, I encountered a problem with the case statement.

Although my syntax was right, MS Query kept throwing exception about the CASE statement. I read some discussions on-line, and some people had the wrong syntax, such as including the alias of the case statement in the group by statement. I did not have that problem. Finally, I found the solution: It was the order by clause. I was using the alias of the case statement in the order by clause. I removed it and the query ran just fine.

Related posts:

  1. Super-Easy Guide to the Microsoft Office Excel 2003 Object Model
  2. Microsoft Office Assistance: Summing up ways to add and count Excel data
Posted in Error messages - Tagged excel, MS query, SQL
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« Mining publication data
» Linked Table Query Returning Incorrect Results

No Comments Yet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Tags

Access Alt F8 Books boxplot cells charts count cursor dashboard data mining dbase design error excel excel functions export filter flip LaTex MS query Number Err ODBC pipes Press Alt F11 Public Sub python R random numbers Range Cells report scripting software sparklines SQL SQL server stack columns statistics stemming string tag cloud text mining UDF VBA visualization wildcard

Network

View Ashutosh Nandeshwar's profile on LinkedIn

Recent Comments

  • W. McNabb on The search key was not found in any record in Access
  • Manuel on The search key was not found in any record in Access
  • Wendy Naples on The search key was not found in any record in Access
  • larry on Access Export to Excel (2007)
  • Betty Chou on Projects

Related Posts

  1. Super-Easy Guide to the Microsoft Office Excel 2003 Object Model
  2. Microsoft Office Assistance: Summing up ways to add and count Excel data

EvoLve theme by Blogatize  •  Powered by WordPress nandeshwar.info