December 8, 2010 at 3:00 am
Table has two columns Name and ID.
ID (int,not null)
Name (nvarchar(255),not null)
I need a SQL script that will run on a report server that will do the following:
User inputs "New.Name"
User inputs "Old.Name"
If "New.Name" AND "Old.Name" is not in Column [Name] then Print "Names Incorrect" then return to beginning. else continue
Find a number that is not in the ID Column then Declare as @Number
Declare @NewID AS int
Declare @OldID AS int
SET @NewID = ID Where Name = New.Name
SET @OldID = ID where Name = Old.Name
UPDATE Table SET ID = @Number WHERE ID = @NewID
UPDATE Table SET ID = @NewID WHERE ID = @OldID
UPDATE Table SET ID = @OldID WHERE ID = @NewID
Is it possible to code this in SQL Server 2005 Reporting Services?
I have tried my best with my little knowledge of SQL but I am not sure what to do with the rest.
December 8, 2010 at 3:55 am
How could a query the database to provide a drop down list?
December 10, 2010 at 7:09 am
Thanks
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply