A little more info. I have to have the service provided and the frequency in two separate fields. The OutPatient query returns the Frequency, but then I have to also deliver the service name.
...is I would like to use the "AS Outpatient" furth down my SQL staement.
For example:
SELECT A.cl_id,
A.cl_ln,
A.cl_fn,
((SELECT COUNT(*) AS OutCount FROM eventstb E WHERE A.cl_id = E.e_case_no and
(e_service BETWEEN 110 AND 113 OR
e_service BETWEEN 180...
...work because the A.cl_ID is before the Select. How do I get this to work?
DECLARE @OutPatient varchar(1000)
SET @Outpatient = ((SELECT COUNT(*) AS OutCount FROM eventstb E WHERE A.cl_id = E.e_case_no and
(e_service BETWEEN 110 AND 113 OR...
Monksnake,
I would like my code to be like this:
CASE
WHEN @OutPatient>0 THEN 'Outpatient Therapy'
WHEN @OutPatient=0 and @MedCheck>0 THEN 'Outpatient Medical Services'
WHEN @OutPatient=0 and @MedCheck=0 and @PsychRehab >0 THEN 'Psychiatric Rehab Services'
END as Column1
The...
...Services'
END as Column1
Here's how it looks in it's working state:
SELECT A.cl_id,
A.cl_ln,
A.cl_fn,
CASE
WHEN ((SELECT COUNT(*) AS OutCount FROM eventstb E WHERE A.cl_id = E.e_case_no and
(e_service BETWEEN 110 AND 113 OR
e_service BETWEEN 180...
Windows 2003
Sql Server 2000
Tablets with Windows XP Tablet Edition
We have a wireless network with an application that runs off of SQl Server 2000. Periodically, the tablets we have loose conncetion from the network. If they are in the application while their connection goes down and a...
Goal:
I need a calculation to occur even if no data is returned. I'd also like the group by deapartment to appear even if no data was returned.
Problem:
I have an overhead report that does hard-coded calculations for several departments. Sometimes, a department will not have any activity for...
I figured it out.
>>I've tried Crystals: "How to suppress a section in the main report that contains a blank subreport". I did work, but not on all the groups on the main report.
I had accidently included the Suppress shared variable in the second subreport group.
Crystal Reports 8.5 to XI
I have all of the above. I'm currently using 8.5, but I can use any version of you can get this work.
I have a report with a subreport. I want the Main report to only be visible if subreport data is returned. As it is now, the main report is returing data even if...
Imagine the schedule in Microsoft Outlook. Someone blocks out time from 8am to 12pm that they are free(non-billable). At some point people start arriving and the person creates an ad-hoc appointment for 9am to 10am. The new appointment in our system simply "overlays" over the non-billiable...
SQL Server 2000
Windows 2003 Server
Goal: I need to “Back Out” non-billable time from billable time. I really only need a total time for the week. This is for an Hours Report with 40 hours a week being the standard.
Tables:
BillableTime(BT)
StaffID(int), StartTime(datetime)...
I'm using a Liant Relativityv6 ODBC Driver with Crystal Reports 8.5, and keep getting a Logon Box pop up. I can click "ok", and it loads the information. It's annoying. I can't seem to figure out a solution to get rid of it. I know it has something to do with opening the connection because I...
I have SQL Server 2000 that has a five databases on it. I have a vendor who needs access to this server since his database now resides on it. We have a VPN connection to allow him through, but I am unsure on what security precautions I need to take care of before I give him access. I also now...
Sql Server 2000
In the Enterprise Manager under Security, Logins I have an existing user using Windows Authentication. The first tab, General, there's a Defaults section with either Database or Language.
Problem:
I have two databases School and SchoolII. School was the old database, and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.