Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, everyone. Hope all is well, I need a help in SQL Server, please. I have a ta

ID: 3852829 • Letter: H

Question

Hi, everyone.

Hope all is well, I need a help in SQL Server, please.

I have a table called ImportA which have a column Id, RowId, YearFrom , YearTo.

column Id is uniqueidentifier with NEWID() as default value. so, I want to get same data into RowId column from column Id, when program run,

example:

Id RowID YearFrom YearTo

4546dfgfhh4g6hf545fggdh (I need same data as Id column for each row) 2002 2003

g4654ghs3213g6h4dgdghdg g4654ghs3213g6h4dgdghdg 1988 2000

and so on

is anybody can help me for this, please?

best regards

Explanation / Answer

You can probably update the column RowID of the table ImportA to column Id

Syntax:-

UPDATE tableName
SET destination_col=source_col
WHERE condition;(if necessary);

Answer:-
UPDATE ImportA
SET RowID=Id;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote