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
ahmed elbarbary
NA
1.6k
275.3k
How to make status update when only value site assembly exist on temp
Jul 29 2020 9:50 PM
I work on SQL server 2012 Query I face issue : I can't Update status when at Least one Assembly Site
Record on temp table #rev Matched temp table #location based on Revision Id .
Expected Result is :
Revision Id Status
1900 Found
2000 Not Found
5000 Found
as Example
Revision Id 1900 status Will be Found because Revision Id 1900 on temp #rev equal LocRevisionId on temp
#location and Assembly Site on temp #rev equal locAssemblySiteId on temp #location at least one .
AND
Revision Id 2000 status Will be Not Found because Revision Id 2000 on temp #rev equal LocRevisionId on
temp #location and Assembly Site on temp #rev Not equal locAssemblySiteId on temp #location at least one .
create
table
#rev
(
RevisionId
int
,
AssemblySiteId
int
,
Status nvarchar(200)
)
insert
into
#rev(RevisionId,AssemblySiteId)
values
(1900,200),
(2000,300),
(5000,800)
create
table
#location
(
locRevisionId
int
,
locAssemblySiteId
int
)
insert
into
#location(locRevisionId,locAssemblySiteId)
values
(1900,200),
(1900,150),
(2000,290),
(2000,310),
(5000,800),
(5000,820)
Reply
Answers (
1
)
When run query for only part it take too much time so How to solve thi
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_