SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 Date Question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vk18
Posting Yak Master

146 Posts

Posted - 10/10/2006 :  16:59:50  Show Profile  Reply with Quote
Hello Friends
I 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

Edited by - vk18 on 10/10/2006 17:21:41

SwePeso
Patron Saint of Lost Yaks

Sweden
30111 Posts

Posted - 10/10/2006 :  17:07:44  Show Profile  Visit SwePeso's Homepage  Reply with Quote
UPDATE tblMonths
SET ScheduledDate = <something>
where datepart(year, ScheduledDate) = datepart(year, @pickdate) and datepart(month, ScheduledDate) = datepart(month, @pickdate)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

vk18
Posting Yak Master

146 Posts

Posted - 10/10/2006 :  17:22:21  Show Profile  Reply with Quote
Hi,

Actually i did updated my question, please see above
Thx

Edited by - vk18 on 10/10/2006 17:24:01
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30111 Posts

Posted - 10/10/2006 :  17:23:31  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Actually I wrote the condition too you are searching for.
Look what is written in the WHERE clause.


Peter Larsson
Helsingborg, Sweden

Edited by - SwePeso on 10/10/2006 17:24:09
Go to Top of Page

vk18
Posting Yak Master

146 Posts

Posted - 10/10/2006 :  18:05:20  Show Profile  Reply with Quote
quote:
Originally posted by Peso

Actually I wrote the condition too you are searching for.
Look what is written in the WHERE clause.


Peter Larsson
Helsingborg, Sweden


Hi,
I did not understand, can you explain me clearly..?
THX
Go to Top of Page

vk18
Posting Yak Master

146 Posts

Posted - 10/10/2006 :  19:30:12  Show Profile  Reply with Quote
Got Another Idea never mind
Thx
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30111 Posts

Posted - 10/11/2006 :  00:50:48  Show Profile  Visit SwePeso's Homepage  Reply with Quote
You're welcome and good luck.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000