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 |
vk18
Posting Yak Master
146 Posts |
Posted - 2006-10-10 : 16:59:50
|
Hello FriendsI have a dropdown box which contains the dates from 1-1-2000 to 12-1-2006. And also I have a column in a table tblmonths called"Scheduleddate". This Scheduleddate column has dates from 2-1-2000, 2-2-2000, 2-3-2000 and so on up to 12-31-2006.If i Pick the Dropdown lets say 3-1-2003 then i need to update the rest of the fields in the table tblmonths which has dates in the field Scheduleddate from 3-1-2003 to 3-31-2003 not all of them. I know updating the table. how to check this condition..? Can you guys help me with code when i pick the date in the drop down then i need to update the table only for that month. I am using VB.NET/ASP.NET. Any Ideas..?Thx |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-10 : 17:07:44
|
UPDATE tblMonthsSET ScheduledDate = <something>where datepart(year, ScheduledDate) = datepart(year, @pickdate) and datepart(month, ScheduledDate) = datepart(month, @pickdate)Peter LarssonHelsingborg, Sweden |
|
|
vk18
Posting Yak Master
146 Posts |
Posted - 2006-10-10 : 17:22:21
|
Hi,Actually i did updated my question, please see aboveThx |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-10 : 17:23:31
|
Actually I wrote the condition too you are searching for.Look what is written in the WHERE clause.Peter LarssonHelsingborg, Sweden |
|
|
vk18
Posting Yak Master
146 Posts |
Posted - 2006-10-10 : 18:05:20
|
quote: Originally posted by Peso Actually I wrote the condition too you are searching for.Look what is written in the WHERE clause.Peter LarssonHelsingborg, Sweden
Hi,I did not understand, can you explain me clearly..?THX |
|
|
vk18
Posting Yak Master
146 Posts |
Posted - 2006-10-10 : 19:30:12
|
Got Another Idea never mindThx |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-11 : 00:50:48
|
You're welcome and good luck.Peter LarssonHelsingborg, Sweden |
|
|
|
|
|
|
|