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.
Author |
Topic |
Pasi
Posting Yak Master
166 Posts |
Posted - 2014-02-13 : 12:40:56
|
HI ,I have a store procedure that populates my form with data. now I need to add a function in there to prompt for begin date and end date to pull information for the selected date range. is there such functionality? Please help.Thanks,Pasihere is my SP:ALTER PROCEDURE [dbo].[myprep] ASBEGINselect distinct p.last_name, p.first_name, person_nbr,cpt4_code_id, service_item_desc, mstr_list_item_desc, group_name--p.person_id from person pinner join person_payer pp on pp.person_id =p.person_idinner join patient_ b on b.payerName= pp.payer_nameinner join mstr_lists ml on ml.mstr_list_item_desc= pp.payer_nameinner join patient_procedure d on d.person_id = pp.person_id--inner join patient_procedure c on c.payer_id =pp.payer_idwhere group_name= 'ACO'and cpt4_code_id in('99238', '99239')order by last_name Asc SET NOCOUNT ON; END |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-02-13 : 12:48:03
|
Not in SQL serverYou should be doing the prompt part in front end using webforms------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-02-13 : 23:13:00
|
not possible in SQL.The prompting should be from your front end client application. Then you change the stored procedure to pass in the begin & end date as a parametercreate procedure <procedure_name>@begin_date date,@end_date date KH[spoiler]Time is always against us[/spoiler] |
|
|
Pasi
Posting Yak Master
166 Posts |
Posted - 2014-02-14 : 16:49:35
|
Got it thnax. That's what I ended up doing.Pasi |
|
|
|
|
|
|
|