Solved

SQL Server Where Condition

Posted on 2014-11-11
5
101 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

730 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