I keep getting the error "Syntax error converting the varchar value 'division_muster' to a column of data type int. The table consist of many different types of permissions and I am passing a varchar variable @strPerms which contains the name of a field. When I run the following code I get the error.
This table consists of fields, which are the types of permissions.
TIA
Mike
Code:
DECLARE @strPerms VARCHAR(50)
SET @strPerms = 'division_muster' [COLOR=green]' This is passed from the Web page [/color]
Select * from personnel P
Left Outer Join permission PE on P.pid=PE.pid
where (@strPerms = 1)
and is active = 1
order by lname,fname
TIA
Mike