Solved

SQL Server Where Condition

Posted on 2014-11-11
5
91 Views
Last Modified: 2014-11-11
Hi experts,

I have is:
Auto complete all records where GRP_NR IN (470014, 470025, 470038, 470050, 470062, 470075, 470086, 470098, 470110, 470122).

set CAQH_MAIN field values =
STAT_CD = 'COMPLETED'
STAT_TS = file load date timestamp
CAQH_USR_KY = NULL
VALDTN_STAT = 'D'
VALDTN_RSN = 'NONG'
VALDTN_ADDL_OI_NM = 'IND INDEMNITY'


The table name:
CAQH_MAIN

Need some help with the correct syntax and direction?

Thank You for helping me...
0
Comment
Question by:Amour22015
  • 2
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
Koen Van Wielink earned 500 total points
ID: 40435742
update CAQH_MAIN
set
STAT_CD = 'COMPLETED',
STAT_TS = Getdate(),
CAQH_USR_KY = NULL,
VALDTN_STAT = 'D',
VALDTN_RSN = 'NONG',
VALDTN_ADDL_OI_NM = 'IND INDEMNITY'
Where GRP_NR IN (470014, 470025, 470038, 470050, 470062, 470075, 470086, 470098, 470110, 470122)

Open in new window

0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 40435749
UPDATE CAQH_MAIN
set STAT_CD = 'COMPLETED',
 STAT_TS = file load date timestamp,  --You may have to look at the syntax of this one
 CAQH_USR_KY = NULL,
 VALDTN_STAT = 'D',
 VALDTN_RSN = 'NONG',
 VALDTN_ADDL_OI_NM = 'IND INDEMNITY'
WHERE GRP_NR IN (470014, 470025, 470038, 470050, 470062, 470075, 470086, 470098, 470110, 470122)
GO


Kelvin
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 40435750
Beaten to it!
0
 

Author Closing Comment

by:Amour22015
ID: 40435775
You were the first, great thanks
0
 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 40436533
Haha, sorry Kelvin. I'm glad I'm finally first for a change, usually get beaten myself by PortletPaul :p.
Glad I could help.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now