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
varsha dodiya
NA
407
75.4k
check for column value and update value in that row in sql
Aug 6 2014 5:33 AM
geeks,
plz help me with sql query
i have a table like this
p_name
qty
batchno
vendor
Odr flag
disprin
20
b5
A
ordered
crocin
5
d3
B
null
disprin
12
b6
B
ordered
(new insert)
2
g3
w
null
you see here disprin is indicating ordered from Odr flag
while crocin has null value in odr flag as not been ordered yet .
now i want when i insert another entry (for example disprin) then query checks if its Odr col has value 'Ordered' then update it as null in all the rows having P_name 'disprin' .
so on inserting disprin it should be like this
p_name
qty
batchno
vendor
Odr flag
disprin
20
b5
A
null
crocin
5
d3
B
null
disprin
12
b6
B
null
disprin
2
g3
w
null
help me guys. any help will be appreciated .
Reply
Answers (
3
)
How do I display webpage results in a listbox Visual Studio
group by clause in sql query