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)
 SQL Select Question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-06 : 08:30:04
William writes "I am converting from MS Access to SQL Server 2000 and am getting an error. How do you prompt user for input.

MS Access Example:
SELECT
[fieldName]
FROM
[table]
WHERE dt/tm Between [Begin Date:] AND [End Date:];

This would prompt the user for a date range. How can I get this to work in SQL Server 2000.

Thank you"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-06 : 08:30:00
you need a front end which will supply parameters to a stored procedure

create proc SomeProc
@BeginDate datetime,
@EndDate datetime
as
SELECT
[fieldName]
FROM
[table]
WHERE dt/tm Between @BeginDate AND @EndDate
go

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -