TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
As Ak
NA
65
7.5k
Display the latest updated data
Oct 11 2020 9:25 PM
I have to display the data that currently being update. The problem is, I'm using the CONVERT function for the columns that i need to display.
This is my code for fetch the data with status 'New'. This code is before updating the status.
SELECT
CONVERT
(
varchar
(10), Start_RG, 2)
AS
Start_RG,
CONVERT
(
varchar
(10), End_RG, 2)
AS
End_RG
FROM
RG
WHERE
Status =
'New'
This is the code for updating the status to 'In Use'
UPDATE
TOP
(1) RG
SET
Status =
'In Use'
OUTPUT
deleted.Start_RG, deleted.End_RG, deleted.Status
WHERE
Status =
'New'
How can i fetch the Start_RG and End_RG that currently updated the status to In Use
Reply
Answers (
5
)
How to debug procedure in SQL Server 2000
Delete data from Table Permanently