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 |
|
kathyc2003
Starting Member
15 Posts |
Posted - 2006-10-20 : 16:18:27
|
| I need to prompt a user for start and end dates as well as start and end times using a specific format for the date and time.I am having difficulty constructing the query.So far I have...DECLARE @StartDate DATETIMEDECLARE @EndDate DATETIMEDECLARE @StartTime DATETIMEDECLARE @EndTime DATETIMESELECT I.IncidentId, I.CFScompanyname, I.New_created_time, E.createdonFROM dbo.IncidentExtensionBase IINNER JOIN dbo.IncidentBase E on I.IncidentId = E.IncidentIdWHERE E.createdon >= @StartDate AND E.createdon <= @EndDate AND E.createdon >= @StartTime AND E.createdon <= @EndTime;Could someone please let me know how I prompt the user for this data.Thank you very much. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-10-20 : 16:26:08
|
| You can't prompt a user for data inside T-SQL (SQL Server). You need to do this in your application.Tara Kizer |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-21 : 00:32:52
|
| >>Could someone please let me know how I prompt the user for this data.Thats what the front end is for.Do it in front end application.MadhivananFailing to plan is Planning to fail |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-21 : 08:01:16
|
> Do it in front end application.ROTFL. this one keeps getting funnier and funnier Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-21 : 08:03:14
|
| >>this one keeps getting funnier and funnier Because newbies want to do all in sqlMadhivananFailing to plan is Planning to fail |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-10-22 : 01:35:35
|
| I don't think that's what Mladen is referring to...he's got a different connotation in mind.Tara Kizer |
 |
|
|
|
|
|