Click to See Complete Forum and Search --> : sql stored procedure!!


sriranjani
November 27th, 2003, 01:10 AM
The following is the way i want to implement this.
that is..to check iff
permissiosn()&2=0x2....permissions()&32=0x20 and so on...

CREATE PROCEDURE balli
@ioparm int output,
@oparm int output AS
BEGIN
SET NOCOUNT ON
IF PERMISSIONS() &@ioparm=0x@oparm
SELECT 1
ELSE
SELECT 0
END

The above sql proc gives syntax error..how do i change it??

antares686
December 3rd, 2003, 07:57 AM
Why are your parameters defined as OUTPUT? And what are you running?

Also this will not behave like you want.

0x@oparm

You would have to make @oParam 0xn and a varbinary but you could simply get away with just the one parameter and do

if PERMISSIONS() & n = n

will work just as well.