PankaJ D

PankaJ D

  • NA
  • 154
  • 0

Error in SQL CODE

Mar 7 2011 2:11 AM
When I execute this code Syntax error is occured.

declare @category varchar(40);
declare @cat varchar(40);
SET @category='MotorCycle / ATV Audio(0)';
SET  @cat = SELECT LEFT(''''+@category+'',CHARINDEX('(',''''+@category+'')-1)


Incorrect syntax near the keyword 'SELECT', 


Answers (3)