Change (Update) column value of existing data in SQL Server

maideen
 
on Jun 01, 2021 07:26 PM
714 Views

Hi Sir

how to change column value in existing data to another which is already existing

First of all, I am sorry, I don't know how ask the question for this issue

Below is my issue

I need to change date to another seq_no.

Example : Seq_No is static, cannot be changed, Seq_no: 1356 Date: 2021-02-08 I need to change date for Seq_No 1356 to 2021-02-15 and 1357 to 2021-02-22 until end of Sql_no.

There are lots of data until 2025. It is large currently, we are changing one by one

Really, i do not have any idea,

Please advice me

Thank you

Maideen

Seq_no	date
1352	2021-01-11
1353	2021-01-18
1354	2021-01-25
1355	2021-02-01
1356	2021-02-08
1357	2021-02-15
1358	2021-02-22
1359	2021-03-01
1360	2021-03-08
1361	2021-03-15
1362	2021-03-22
1363	2021-03-29
1364	2021-04-05
1365	2021-04-12
1366	2021-04-19
1367	2021-04-26
1368	2021-05-03
1369	2021-05-10
1370	2021-05-17
1371	2021-05-24
1372	2021-05-31
1373	2021-06-07
1374	2021-06-14
1375	2021-06-21
1376	2021-06-28
1377	2021-07-05
1378	2021-07-12
1379	2021-07-19
1380	2021-07-26
1381	2021-08-02
1382	2021-08-09
1383	2021-08-16
1384	2021-08-23
1385	2021-08-30
1386	2021-09-06
1387	2021-09-13
1388	2021-09-20
1389	2021-09-27
1390	2021-10-04
1391	2021-10-11
1392	2021-10-18
1393	2021-10-25
1394	2021-11-01
1395	2021-11-08
1396	2021-11-15
1397	2021-11-22
1398	2021-11-29
1399	2021-12-06
1400	2021-12-13
1401	2021-12-20
1402	2021-12-27

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jun 02, 2021 01:25 AM

Hi maideen,

Use below two query to change the value.

UPDATE Table SET Date = '2021-02-15' WHERE Seq_no = 1356
UPDATE Table SET Date = '2021-02-22' WHERE Seq_no > 1356