Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need to get input in Parameter from end user

Author  Topic 

prince500
Starting Member

21 Posts

Posted - 2007-05-24 : 14:08:02
Hi,

I am trying to make a simple stored procedure which I want to take input on every run from end user:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
declare @sku varchar(20)

insert into skua (sku,SumOfQtyNum)
(select sku,sumofqtynum from sku where @sku = sku.sku)


it is working but not asking parameter values

(I want to use passthrough query after that in Access)
thanks




AA

Kristen
Test

22859 Posts

Posted - 2007-05-24 : 14:19:47
I'm afraid all that does is to declare a local variable (@sku), which will have a default value of NULL, and then run the query trying to match @sku = sku.sku.

It won't ask the user anything, you application has to do that bit.

Kristen
Go to Top of Page

prince500
Starting Member

21 Posts

Posted - 2007-05-25 : 12:32:15
Thanks for advise and help!

AA
Go to Top of Page
   

- Advertisement -