I want to store a position of index in a variable using SQl query But not with stored procedure. Like this select set i=charindex("DAY","Docterms")(case when i<>0 then ' ' else ' ' end)from table. I am MCa and working as a software Eng. ,I want to do Microsoft certified course.. can anyone tell me about online certofication related to DBA administrator or SQL Expert.
First and foremost thing is install SQL SERVER on your machine and read BOOKS ONLINE either for certification or to get the answer for your question... In sql server Variable names must begin with one at sign (@)... Read BOL topics "SET @local_variable" ,"CHARINDEX" AND "CASE"... http://www.microsoft.com/technet/prodtechnol/sql/2005/learning/default.mspx http://www.microsoft.com/learning/sql2005/digdeep/default.mspx https://www.microsoftelearning.com/sqlserver2005/#da MohammedU. Moderator SQL-Server-Performance.com