Column Alias Support for SQL Queries

When I attempt to use a column alias with the SQL language selected in LINQPad, I am receiving a parse error upon query execution.

The following query concisely illustrates what I am trying to do. The query works fine if I execute it via SSMS or other solutions. Is the column alias feature unsupported by LINQPad?

SELECT d.DepartmentId AS Id, d.DepartmentName AS Name FROM Department d


  • I could be wrong on this but I think LINQPad just hands the query over to the server and lets the server do the parsing. Are you sure you've selected the right database in the connection drop down box?

    I just tested something similar to this and it worked.
  • edited October 2017
    Ah that would make sense. It appears to be a limitation of SQL Server Compact edition since I am connecting to a database with the .sdf extension. Thanks for guiding me in the right direction Filter! I truly appreciate the assistance.
  • I have a CE 4.0 sdf and I am able to use column and table aliases in LinqPad.

    Also, since it says it works in SSMS, that would suggest it isn't a limitation in SQL CE.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!