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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Access parameters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-16 : 07:57:19
Michael writes "PARAMETERS [date] DateTime;
SELECT impGAP.CURRENCY, impGAP.PRODUCT, IMPGAP.TRADER, impGAP.TICKET, impGAP.DATE_GAP, impGAP.NET_CF, ([rate_1]+(([rate_2]-[rate_1]))*(([date_gap]-[date])-[beg])/([end]-[beg])) AS rate, [DATE_GAP]-[DATE] AS DAYS, [DATE] AS RUNDATE
FROM MON_INT_SENS_RATES, impGAP
WHERE ((([DATE_GAP]-[DATE]) Between [beg] And [end]) AND ((MON_INT_SENS_RATES.ccy)=[currency]));

Above SQL I tried to move to Stored Procedures and having 1 problem. I do not know how to translate "PARAMETERS [date] DateTime;" in ACCESS to SQL server so that it will give a date to work with."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-16 : 08:03:36
Use Input parameter

Create Procedure myProc (@date datetime)
as
Select columns from yourtable where datefield=@date

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -