Solved

SQL Server Where Condition

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

910 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

19 Experts available now in Live!

Get 1:1 Help Now