March 25, 2012 at 10:40 pm
Hi Everybody,
i need to take one moth data from the main table. it will be stored into temp table. while executing the below query. it shows invalid column name..
------------ query ---------------------------------------
insert into tempdb.dbo.temp1 select a.id,[a.current],a.name,a.age,a.sex from
dbo.employee a join sales b on a.empid=b.empid
where a.datetime > '02/01/2012' and a.datetime < '03/01/2012'
current is the keyword. so that i put [] brackets.
------------------------------------------------------------
Error Msg :
Invalid column name a.current.
------------------------------------------------------------
But the current column is exist in an employee table.
i don't know, why the error is occurred?
I would really appreciate, if anybody can helps me to fix it.
Regards
Balaji G
March 25, 2012 at 11:31 pm
balaji.ganga 68339 (3/25/2012)
Hi Everybody,i need to take one moth data from the main table. it will be stored into temp table. while executing the below query. it shows invalid column name..
------------ query ---------------------------------------
insert into tempdb.dbo.temp1 select a.id,[a.current],a.name,a.age,a.sex from
dbo.employee a join sales b on a.empid=b.empid
where a.datetime > '02/01/2012' and a.datetime < '03/01/2012'
current is the keyword. so that i put [] brackets.
------------------------------------------------------------
Error Msg :
Invalid column name a.current.
------------------------------------------------------------
But the current column is exist in an employee table.
i don't know, why the error is occurred?
I would really appreciate, if anybody can helps me to fix it.
Regards
Balaji G
Thanks to Everyone. I got the results..
It works a.[current] instead of [a.current]
Regards
Balaji G
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply