First off, I am still relatively new to SQL and trying out a Temp table for the first time. I am still in a massive learning curve!!
I am currently getting the following Error in Query Analyzer and can not figure out the error in my coding (please again .... new to SQL)
Server: Msg 170, Level...
In my Report (with the SQL code used below), I am pulling to this report the Doctor ID, the Facility ID and the Carrier ID.
What I have occuring right now is I am getting
Doc ID Fac ID Carrier ID
7 3 50
7 3 50
7 3 50
and so on ...
In my Report (with the SQL code used below), I am pulling to this report the Doctor ID, the Facility ID and the Carrier ID.
What I have occuring right now is I am getting
Doc ID Fac ID Carrier ID
7 3 50
7 3 50
7 3 50
and so on ...
In my report code, I am pulling pva.InsBalance + pva.patbalance AS TotalVisitBalance,
What I need is, to know the date in which this balance went to $0.00. Is it possible to script this anyhow?
set nocount on
declare @startdate datetime,
@enddate datetime,
@ticketnumber...
Can anyone describe why this was received? Ive never encountered this error before.
Server: Msg 8152, Level 16, State 9, Line 44
String or binary data would be truncated.
The statement has been terminated.
Server: Msg 8152, Level 16, State 9, Line 132
String or binary data would be truncated...
Currently, I am only receiving patients back that have NULL values for the "Termination Date" and "Effective Date". If either one of these fields has a value in it, I'm not receiving them back in my report. The ?DATES.DATE2? will be replaced by actual dates from the end user.
SECTION OF CODE...
I need this report to report back only the VititBalances greater than $0.00
I know it needs to go into my "Where", but not to sure how to since I made this field from two fields InsBalance plus PatBalance. Any assistance is appreciated.
patientVisitagg.[InsBalance]+...
Strange request ---
The code below provides me the current age of the patient. How can I code it to provide me the age of the patient at the Time of Service (PatientVisitProcs.DateOfServiceFrom AS [Date Of Service])? So if my patient was 16 back in 2004 and on this DOS, I want it to show that...
Why am I getting this error message? I have tried many different things and cant seem to fix this one. Any help or insight is greatly appreciated.
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
/*Insurance Termination Report*/
SELECT DISTINCT...
I am using the following code and the 'PatientAge' is not returning a value ... confused. Any insight is appreciated...
Declare @ApptDate DATETIME
DECLARE @AppointmentsId INT
Select @ApptDate = a.ApptStart
FROM Appointments a
WHERE a.AppointmentsId = @AppointmentsId
SELECT pp.First...
I have a report that takes one MD (my Source Doctor) and his/her Fee Schedule and it should copy and update the fee schedule to my other Doctor (my destination Doctor).
The report currently (as listed below) only inserts doesn't update on the feeschedule that is modified. I need to somehow...
What is the difference between a Left Join and a Left Outer Join? Trying to understand what the outer does to the Left ... sorry for the novice question.
Jeff
SELECT * FROM users WHERE clue > 0
I have a 2 page report, with all my necessary fields in Details "A" and Details "B". The Report and Page Headers and Footers are both supressed.
I read the Crystal Clear article and read the forum prior posts and can't seem to get this working right:
"The solution is to create a second group...
I want to add in the following fields (along with many more for that matter)
ISNULL(pp.[Phone1],'')AS Phone1,
ISNULL(pp.[Phone1Type],'')AS Phone1Type,
ISNULL(pp.[Phone2],'')AS Phone2,
ISNULL(pp.[Phone2Type],'')AS Phone2Type,
to this query. I can't seem to get these fields in without QA...
I want to take the below field:
pva.PatBalance AS [Visit Pat Balance],
and make a new field 140% of Visit Pat Balance. So if the balance is $100.00 on Visit Pat Balance, I want this field to take the Visit Pat Balance at 140% and report out $140.00.
I tried:
'140PatBal' = pva.PatBalance *...
Ive tried many different ways to get this to work right and cant seem to get it. Should I use a Subquery, MAX, TOP or something else?!
I want the last note only for this field:("pc.Description AS Notes").
Any help is greatly appreciated!!!
SET NOCOUNT ON
SELECT...
I want the last record only for the field pc.[Description]. Should I use the MAX and if so, how do I do it?
SELECT DISTINCT CONVERT(VARCHAR,pv.visit,101) AS DOS,
pv.TicketNumber,
ISNULL(pp.first,'')+ ' '+ ISNULL(pp.last,'')AS [Patient Name],
ISNULL(pp.Address1,'')+ ' '+...
I'm hoping its just a matter of syntax wording ... Which I'm still learning ...
Is it possible to add an ISNULL to this code?
CONVERT(varchar,pp.Birthdate,101) AS Birthdate,
Typically, I use:
ISNULL(pp.Birthdate,'') AS Birthdate,
When I tried to get add an ISNULL to the code, it gave...
I am getting the following error on this Update Query and cant quite get it right ... any help is greatly appreciated.
Server: Msg 107, Level 16, State 2, Line 61
The column prefix 'ppa' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line...
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.