Cannot Reference Named Column in WHERE Clause
- From: Chaplain Doug <ChaplainDoug@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 May 2008 11:08:05 -0700
SQL Server 2005.
I have a view defined for a database. Part of the query is:
SELECT dbo.GL7PROJECTS.PROJECTID AS JURISDICTION
I have not problem using JURISDICTION in the ORDER BY clause, but when I try
to use it in a WHERE clause (e.g., WHERE JURISDICTION LIKE '001%') I get an
error (while in the SQL Server Management Studio) saying:
Invalid column name 'JURISDICTION'
What might be causing this and why does it not work??? Thanks for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
.
- Follow-Ups:
- Re: Cannot Reference Named Column in WHERE Clause
- From: Russell Fields
- Re: Cannot Reference Named Column in WHERE Clause
- Prev by Date: Re: Extracting the table names to which a fied is related to
- Next by Date: Re: Cannot Reference Named Column in WHERE Clause
- Previous by thread: Extracting the table names to which a fied is related to
- Next by thread: Re: Cannot Reference Named Column in WHERE Clause
- Index(es):
Relevant Pages
|
|