Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple query wont work

Status
Not open for further replies.

NateProg

Programmer
Apr 22, 2003
1
US
declare @prm nvarchar
select @prm as NewField, phone
From tblAddress


This query validates/runs fine on my sql server, but when I try to run it from access, it doesn't prompt for the parameter. As well, when I look at it in access it shows this.

ALTER procedure test
as
declare @prm nvarchar
select @prm as Shift, phone
From tblsite

Why can't acces select a parameter?
 

You don't have a parameter in the SP.
ALTER procedure test
as
declare @prm nvarchar
select @prm as Shift, phone
From tblsite

Parameters are before the AS
Why are you using an nvarchar as a parm?

ALTER procedure test
@prm varchar(10) = ''
as
select Shift, phone
From tblsite where yourfield = @prm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top