sql query
-
here is an sql query in which all fiels are correctly written- (select admin.*, brok.FirstName+' '+brok.LastName as BrokerName from adminmsgrecieved as admin,brokerdetails as brok where admin.AdminId='111' and brok.BrokerId=admin.FromBrokerId ) as custo(AdminId,FromBrokerId,FromCustId,Subject,DateOfMsg,Message,Status,MsgId,BrokerName) but i got an error "syntax error near as" what it may be?? plzz help.....
-
here is an sql query in which all fiels are correctly written- (select admin.*, brok.FirstName+' '+brok.LastName as BrokerName from adminmsgrecieved as admin,brokerdetails as brok where admin.AdminId='111' and brok.BrokerId=admin.FromBrokerId ) as custo(AdminId,FromBrokerId,FromCustId,Subject,DateOfMsg,Message,Status,MsgId,BrokerName) but i got an error "syntax error near as" what it may be?? plzz help.....
if you are concanating two columns then place it with in brakets like (brok.FirstName+' '+brok.LastName) as BrokerName Hope this will work fine.
Rajeev Kr. Sharma Sr. Software Engineer E-Meditek Solutions Ltd. http://www.emeditek.co.in/
-
here is an sql query in which all fiels are correctly written- (select admin.*, brok.FirstName+' '+brok.LastName as BrokerName from adminmsgrecieved as admin,brokerdetails as brok where admin.AdminId='111' and brok.BrokerId=admin.FromBrokerId ) as custo(AdminId,FromBrokerId,FromCustId,Subject,DateOfMsg,Message,Status,MsgId,BrokerName) but i got an error "syntax error near as" what it may be?? plzz help.....
Your SQL is broken. And so is your logic, this is not the SQL forum. Your from needs to be AFTER all the column specifications.
Christian Graus Driven to the arms of OSX by Vista. Please read this[^] if you don't like the answer I gave to your question. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
-
if you are concanating two columns then place it with in brakets like (brok.FirstName+' '+brok.LastName) as BrokerName Hope this will work fine.
Rajeev Kr. Sharma Sr. Software Engineer E-Meditek Solutions Ltd. http://www.emeditek.co.in/