below is a sql query i run in sql server sucessfully, however in access the declare staements are the cause of errorrs can someone help me re-write this query to fix the issue.
Thanks in advance.
DECLARE @Result INT
DECLARE @Search VARCHAR(255)
DECLARE @Value VARCHAR(255)
set @Search = 'OciusUseCV2'
set @Value = 'True'
set @Result = (select count(*) from setting where UPPER([key]) = UPPER(@Search))
select @result
if @result = 0
INSERT INTO Setting
([User],Section,[Key],[Value])
VALUES
('SYSTEM','Settings',@Search,@Value)
Thanks in advance.
DECLARE @Result INT
DECLARE @Search VARCHAR(255)
DECLARE @Value VARCHAR(255)
set @Search = 'OciusUseCV2'
set @Value = 'True'
set @Result = (select count(*) from setting where UPPER([key]) = UPPER(@Search))
select @result
if @result = 0
INSERT INTO Setting
([User],Section,[Key],[Value])
VALUES
('SYSTEM','Settings',@Search,@Value)