Jump to content

SQL experts in Oka question


jefferson1

Recommended Posts

Creation Date                                         DueDate

2020-05-07 21:59:03.787           2020-05-08 21:59:03.787

2020-05-07 21:43:13.787           2020-05-08 21:43:13.787          

2020-05-07 21:29:19.703           2021-05-08 21:29:19.703

 

how do i update the year in due date ( first two rows)

 

there are several rows, which i want the year to be updated

Link to comment
Share on other sites

5 minutes ago, jefferson1 said:

Creation Date                                         DueDate

2020-05-07 21:59:03.787           2020-05-08 21:59:03.787

2020-05-07 21:43:13.787           2020-05-08 21:43:13.787          

2020-05-07 21:29:19.703           2021-05-08 21:29:19.703

 

how do i update the year in due date ( first two rows)

 

there are several rows, which i want the year to be updated

Use the primary key and alter table change date 

 

Link to comment
Share on other sites

9 minutes ago, jefferson1 said:

Creation Date                                         DueDate

2020-05-07 21:59:03.787           2020-05-08 21:59:03.787

2020-05-07 21:43:13.787           2020-05-08 21:43:13.787          

2020-05-07 21:29:19.703           2021-05-08 21:29:19.703

 

how do i update the year in due date ( first two rows)

 

there are several rows, which i want the year to be updated

https://stackoverflow.com/questions/10388351/how-to-change-only-the-year-of-a-date-datatype

Link to comment
Share on other sites

Just now, jefferson1 said:

where did i go wrong?

Nee scenario complete ga explain chey man..ila table undhi..first 2 rows update cheyyali ante ela?.... requirement proper ga cheppu...otherwise the solutions u get now will work but screwup later..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...