Click here to Skip to main content
15,899,475 members
Home / Discussions / Database
   

Database

 
AnswerRe: Storing images, documents etc in a database Pin
Mycroft Holmes16-Dec-10 0:10
professionalMycroft Holmes16-Dec-10 0:10 
AnswerRe: Storing images, documents etc in a database Pin
Hiren solanki16-Dec-10 0:41
Hiren solanki16-Dec-10 0:41 
AnswerRe: Storing images, documents etc in a database Pin
Not Active16-Dec-10 2:23
mentorNot Active16-Dec-10 2:23 
AnswerRe: Storing images, documents etc in a database Pin
RaviRanjanKr16-Dec-10 2:53
professionalRaviRanjanKr16-Dec-10 2:53 
GeneralRe: Storing images, documents etc in a database Pin
jgrogan16-Dec-10 4:38
jgrogan16-Dec-10 4:38 
GeneralRe: Storing images, documents etc in a database Pin
jschell16-Dec-10 8:47
jschell16-Dec-10 8:47 
GeneralRe: Storing images, documents etc in a database Pin
Mycroft Holmes16-Dec-10 12:07
professionalMycroft Holmes16-Dec-10 12:07 
GeneralRe: Storing images, documents etc in a database Pin
jgrogan16-Dec-10 23:22
jgrogan16-Dec-10 23:22 
GeneralRe: Storing images, documents etc in a database Pin
Mycroft Holmes17-Dec-10 11:07
professionalMycroft Holmes17-Dec-10 11:07 
GeneralRe: Storing images, documents etc in a database Pin
Ray Cassick19-Dec-10 4:29
Ray Cassick19-Dec-10 4:29 
GeneralRe: Storing images, documents etc in a database Pin
jschell19-Dec-10 10:08
jschell19-Dec-10 10:08 
AnswerRe: Storing images, documents etc in a database Pin
Henry Minute17-Dec-10 13:51
Henry Minute17-Dec-10 13:51 
QuestionSSIS package converting varchar(MAX) to nvarchar(50) Pin
raghvendrapanda15-Dec-10 22:36
raghvendrapanda15-Dec-10 22:36 
Question\r\n ignored when executing queryies using ADO Pin
Fayu14-Dec-10 13:01
Fayu14-Dec-10 13:01 
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 

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.