Solved

SQL Server Where Condition

Posted on 2014-11-11
5
105 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

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 13

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

691 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