General information
Forum:
Microsoft SQL Server
Title:
Incrementing a field with a select statement
Hello Group,
Can I increment a field in a select statement.
I have a table with two hundred rows I want to update add my field with values from 300 - 500
I have a variable name @newvalue
can I write a select statement that will create a new table I.E.
SELECT @NewValue (some increment method) as myuniquefield, name, address
INTO myNewTable
FROM myOldTable
Thanks
Jim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only