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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how alias statment will work

Author  Topic 

maruthiprasad123
Starting Member

1 Post

Posted - 2010-09-18 : 00:17:17
Dear sir,
just know i was changed a columnname say "employid" to "EI" and it was chnaged successfully but when i am executing the script select*from employdetails where ei='12' it is showing error message what was the wrong in tht statement please kindly explayin me

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-09-18 : 01:32:47
please post your entire t-sql statement.

I am thinking you did this:

SELECT employid as EI
FROM someTable
WHERE EI = '12'
when you need to do this

SELECT employid as EI
FROM someTable
WHERE employid = '12'
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2010-09-20 : 10:34:40
quote:
Originally posted by maruthiprasad123

just know i was changed a columnname say "employid" to "EI"


Then any pain or inconvenience you suffer is merely karma. Change it back, to avoid the ridicule of your colleagues.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page
   

- Advertisement -