Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Deprecated feature 'String literals as column aliases is not supported in this version of SQL Server'

Return to previous page

  • 4/7/2015
  • 12674 Views

Comments

12674 Views

Deprecated feature 'String literals as column aliases is not supported in this version of SQL Server'

Last updated long time ago

Comments

Common

(Enter the content of this article below)

Advanced

 
This error occurs in SQL Azure because of deprecated syntax.

Error
It normally appears in SQL such as this:


select
dnn_Announcements.ItemID,
dnn_Announcements.ModuleID,
dnn_Announcements.Title,
case when dnn_Files.FileName is null then dnn_Announcements.URL else dnn_Files.Folder + dnn_Files.FileName end as Url,
dnn_Announcements.ExpireDate,
dnn_Announcements.Description,
'CreatedByUser' = dnn_Users.FirstName + ' ' + dnn_Users.LastName,
dnn_Announcements.CreatedDate,
dnn_Announcements.ViewOrder,
dnn_UrlTracking.TrackClicks,
dnn_UrlTracking.NewWindow
from dnn_Announcements


Cause

The error occurs in the usage in this string:
'CreatedByUser' = dnn_Users.FirstName + ' ' + dnn_Users.LastName,

This syntax is no longer supported ; use 'AS name' instead

Fix

Change the literal column renaming to use the 'AS' syntax.
dnn_Users.FirstName + ' ' + dnn_Users.LastName as CreatedByUser,
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out