Thank you all. Sorry for the confusion.
Ryan: That solution was much closer. I only got one enc_nbr that did not belong because it didn't have a Gcode.
But from your example I learned why and I added one more condition which was c2.source_id = pe.enc_id:
SELECT c.source_id, pe.enc_nbr...
Thank you all. Sorry for the confusion.
Ryan: By giving the charges table a different alias in the second Select, is that like joining to the charges table a second time?
This solution is much closer. Now I am only getting one record where there is not a G code.
The same patient with...
makros: Thank you for your reply. Sometimes there will be a 99211 where there is not a G code and I don't need those, so first I want to find my 99 codes and then from that group I want to find which also has a G code. Both the 99 numbers and the G codes are charges and there can be multiple...
I'm looking for the right syntax or even if I'm doing this right. I want to find records with certain SIM numbers and when I find that group I only want the ones that also have other certain SIM numbers.
What I have below errors out "near the keyword IF". Am I supposed to be doing a join...
Ok, thank you. I added one inner join removing the charges associated with the adjustment code we didn't want and turns out that satisfied all the criteria.
I appreciate the help.
wow - I don't know how you made sense of what I said - but that is what I meant! I didn't know how to stop it from filtering out the charge given that criteria.
Now it is not including charges where there has been a payment which is what I wanted.
Next I want to filter out those that have a...
I have 3 tables.
One is a visit table. Visits have charges connected with them.
The second is a charges table and one is a transactions table. Transactions are always connected to charges.
The transactions table has payments and adjustments in two separate fields, in separate records.
There...
That was part of it. I had set it to date but kept getting the "must be a string" error so I couldn't tell if I was going to get the icon or not. Then I converted the field back to a string in the record selection formula and then instead of stopping at the error it opened the parameter and I...
CR11
My database stores the date as 20090401 and I am trying to use that as a parameter in my record selection and want the user to use the calendar icon. If I just use the field as it is the user doesn't get the calendar and has to input 20090401.
I converted it to a date with a formula and...
No, I hadn't tried that. It worked. This is a small office and I don't get a lot of practice so I sometimes stumble over things like that.
Thanks so much -
I'm using SQL Server 2005.
I found out after trying this that the SP wants the user to enter a date for AltStartDate but I just want it to assign a date itself (I would either assign it as today's date and subtract a day in the Where clause - or maybe it would be easier to assign it yesterday's...
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.