Click here to Skip to main content
15,888,241 members
Home / Discussions / Database
   

Database

 
QuestionRe: \r\n ignored when executing queryies using ADO Pin
Chris Meech15-Dec-10 3:04
Chris Meech15-Dec-10 3:04 
AnswerRe: \r\n ignored when executing queryies using ADO Pin
Fayu17-Dec-10 5:23
Fayu17-Dec-10 5:23 
GeneralRe: \r\n ignored when executing queryies using ADO Pin
Chris Meech17-Dec-10 9:39
Chris Meech17-Dec-10 9:39 
GeneralRe: \r\n ignored when executing queryies using ADO Pin
Fayu17-Dec-10 15:26
Fayu17-Dec-10 15:26 
QuestionReplace with integer (1,2,3...) Problem in SQL Query [modified] Pin
Varun Sareen14-Dec-10 0:40
Varun Sareen14-Dec-10 0:40 
AnswerRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki14-Dec-10 0:57
Hiren solanki14-Dec-10 0:57 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Corporal Agarn14-Dec-10 3:26
professionalCorporal Agarn14-Dec-10 3:26 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Jörgen Andersson14-Dec-10 10:04
professionalJörgen Andersson14-Dec-10 10:04 
djj55 wrote:
I copied it out and reformatted, then decided I did not have enough time to decipher all the queries within queries.


Agreed!

But reformatting takes 10 seconds, so if someone else wants to give it a shot:
SELECT DISTINCT (SELECT TOP 1 claimmasterid 
                 FROM   claimmaster 
                 WHERE  encounterid = '87B6D11C-3680-44A5-B1DB-AB16B3907AA6'), 
                evc.encounterid, 
                evc.cpt, 
                (SELECT (SELECT icdcode + ',' AS [text()] 
                         FROM   visittypeicdcpt soi 
                         WHERE  soi.visittypeid = t.visittypeid 
                                AND visittypeid = vti.visittypeid 
                                AND encounterid = 
                                    '87B6D11C-3680-44A5-B1DB-AB16B3907AA6' 
                         ORDER  BY visittypeid 
                         FOR XML PATH( '' )) 
                 FROM   (SELECT DISTINCT visittypeid 
                         FROM   visittypeicdcpt 
                         WHERE  visittypeid = vti.visittypeid 
                                AND encounterid = 
                                    '87B6D11C-3680-44A5-B1DB-AB16B3907AA6') AS t 
                ) 
                diagnosiscode, 
                evc.fee, 
                CONVERT(VARCHAR(10), '2010-12-14 00:00:00.000', 101) 
FROM   encountervisitcode evc 
       INNER JOIN visittypeicdcpt vti 
         ON evc.encounterid = vti.encounterid 
WHERE  evc.encounterid = '87B6D11C-3680-44A5-B1DB-AB16B3907AA6'


"When did ignorance become a point of view" - Dilbert

GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Varun Sareen16-Dec-10 0:32
Varun Sareen16-Dec-10 0:32 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki16-Dec-10 1:54
Hiren solanki16-Dec-10 1:54 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Varun Sareen17-Dec-10 0:56
Varun Sareen17-Dec-10 0:56 
AnswerRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki17-Dec-10 1:16
Hiren solanki17-Dec-10 1:16 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Corporal Agarn17-Dec-10 3:38
professionalCorporal Agarn17-Dec-10 3:38 
QuestionPMT function IN ORACLE OR SQL Pin
ShaktisinhRathod13-Dec-10 23:05
ShaktisinhRathod13-Dec-10 23:05 
AnswerRe: PMT function IN ORACLE OR SQL Pin
Hiren solanki13-Dec-10 23:23
Hiren solanki13-Dec-10 23:23 
QuestionThe permissions granted to user 'domain\user' are insufficient for performing this operation. (rsAccessDenied) Pin
vinu.111112-Dec-10 23:44
vinu.111112-Dec-10 23:44 
QuestionMerge Replication Conflict Pin
Abdul Rahman Hamidy12-Dec-10 22:12
Abdul Rahman Hamidy12-Dec-10 22:12 
Questionread & update using reader Pin
Jassim Rahma12-Dec-10 3:00
Jassim Rahma12-Dec-10 3:00 
AnswerRe: read & update using reader Pin
RaviRanjanKr12-Dec-10 3:26
professionalRaviRanjanKr12-Dec-10 3:26 
GeneralRe: read & update using reader Pin
Not Active12-Dec-10 3:50
mentorNot Active12-Dec-10 3:50 
GeneralRe: read & update using reader Pin
RaviRanjanKr12-Dec-10 4:04
professionalRaviRanjanKr12-Dec-10 4:04 
GeneralRe: read & update using reader Pin
Not Active12-Dec-10 5:13
mentorNot Active12-Dec-10 5:13 
GeneralRe: read & update using reader Pin
RaviRanjanKr12-Dec-10 18:56
professionalRaviRanjanKr12-Dec-10 18:56 
GeneralRe: read & update using reader Pin
MDNadeemAkhter13-Dec-10 17:34
MDNadeemAkhter13-Dec-10 17:34 
GeneralRe: read & update using reader Pin
ShilpaKumari13-Dec-10 7:33
ShilpaKumari13-Dec-10 7:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.