Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mlee1steph

    Help with query: including records

    Hi SQLBill, Thanks for the reply. You actually have a point. I will have to setup for that. We have a termination table thats linked to the Patients table (PatientId is Key). It contains two fields: DOA (Date of Admission) DOT (Date of Termination) When they first add or admitt a client, the...
  2. mlee1steph

    Help with query: including records

    Hi Everyone, >> So, basically you want EVERYONE that was active during the specified dates. Is that correct? <<< I guess it comes down to that. >>>>Question....if they don't have an ATTENDANCE.AttendDate between those dates - HOW do you know they are active during that time frame? Do you...
  3. mlee1steph

    Help with query: including records

    Thats not what I wanted. The original query did work before they asked to include Active clients that have not attended within the date range. Now, an updated version of Denis query almost works : SELECT DISTINCT PATIENTS.PatientID, PATIENTS.LastName+', '+PATIENTS.FirstName AS P_NAME...
  4. mlee1steph

    Help with query: including records

    Hi Denis, Thanks for the reply. I played with that query and did not get the results I expected. there is (in my data) a client that has not been in the program at all in Dec and he does not show up in the results. I though about trying to union all the original query with one that would query...
  5. mlee1steph

    Help with query: including records

    Hi Everyone, I have a query that returns clients that have attended the program. But I now need to update the query so that it does the above, but also clients that did not attend within the date range and that are activeclients. Would you mind a few pointers in the right direction. Here is the...
  6. mlee1steph

    Finding Missing Dates Continued

    Hi bborissov, Thanks again for the reply. That worked with alittle modifications. I have what may seem like a simple question, but I can't seem to quit get it, if its possible. Is there a way to break down a query in a If block or Case statement. For example, taking only a portion of the query...
  7. mlee1steph

    Finding Missing Dates Continued

    Hi Everyone, I'm having a issue with a query I got help here on (I also what to thank bborissov again for the help). Here is what I need. We need to create a query that returns the name, id and dates that the patients have missed (did not showed up). The result must be based on a date range and...
  8. mlee1steph

    Find missing dates

    Hi bborissov, I ran into one little issue, I hope you can help. If I enter the same date for both the Begin and End dates I will not get any results back even though I know there is data for that date. I have a feeling that it may have something to with this line: where...
  9. mlee1steph

    Find missing dates

    Hi bborissov, I would like to thank everyone for the help. I did end up using your solution with a few slight changes (only cause I could not get the join with the declared table to work. So I added a table to hold the data. I ended up with the following: CREATE PROCEDURE...
  10. mlee1steph

    Find missing dates

    Hi r937, Thanks for the reply. >you need to cross join the patients to the dates before >doing the LEFT OUTER JOIN to the data (which i prefer to >the NOT EXISTS -- i don't why, i just do) I didn't see any Left Outer join in the above query. Could you give an example of what you ment. Thank so...
  11. mlee1steph

    Find missing dates

    Hi bborissov, Thank you so much for the help. This appears to be working great. Could you please explain whats happening in the query. I see alot up sub queries but not sure why they where needed. I want to get a better understanding on the query because I have to add the Patient name (from the...
  12. mlee1steph

    Find missing dates

    Hi maswein, Thanks for the reply. This works great, but I was given an extra twist to this one. I need to get the dates for all the clients. I tried to modify the query like so: declare @dt1 smalldatetime Declare @dt2 smalldatetime select @dt1 = '1/2/2005' Select @dt2 = '7/20/2006' create table...
  13. mlee1steph

    Find missing dates

    Hi Everyone, I was wondering how I could date the following table: ClientId AttendDate This table holds dates that our client has been in our office. But I need to find out what dates the clinet was not there given a date range. What is the best way to do this? Thanks for any help. Michael
  14. mlee1steph

    How TO: Get one record from a joined table

    I almost forgot something. There can be cases where the there may not be any record in the TERMINATION for the Patientid, I still need these Patients also. Any ideas? Thanks Michael
  15. mlee1steph

    How TO: Get one record from a joined table

    Hi Skip, Thanks for the reply. The Max is a problem because it is a aggregate function. And I can't add all the field as part of the aggregate. Maybe I can create some sort of subquery to get only the Newest date. Michael
  16. mlee1steph

    How TO: Get one record from a joined table

    Hi Everyone, I have a query that needs to pull data out of 3 tables. Nothing to hard so far. Here the query: SELECT Patients.PatientId, TERMINATION.DOA, TERMINATION.DOT, PATIENTS.PatientID, PATIENTS.LastName, PATIENTS.FirstName, PATIENTS.COUNSELOR, PATIENTS.MEDICAID_ID, PATIENTS.DOB...
  17. mlee1steph

    Gridview Newvalues are empy after editing

    Just wanted to post the markup for the gridview, to see if this helps. I've seen post mention that if the fields are not databound, there will not be any Oldvalues or newvalues generated, but as you can see, I've got most of the fields bound: <asp:GridView ID="grdPOs" runat="server"...
  18. mlee1steph

    Gridview Newvalues are empy after editing

    Hi I'm having a problem getting the newvalues or oldvalues from the RowUpdating event. I have the following code for the event(See note): Protected Sub grdPOs_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles grdPOs.RowUpdating Dim...
  19. mlee1steph

    Access var in MasterPager

    Hi Bob, Thanks for the reply. I got the event to work correctly now, but based on what you've said then maybe I need to go a different way. I thought that the variable would stay active for the life of the page. So, if I understand you correctly then the var data is not saved in the page between...
  20. mlee1steph

    Access var in MasterPager

    Hi Everyone, I'm working on my first ASP.NET app and have been trying to access a var located in the MasterPage. I've tried using a Property to access the var but could not get that to work, so it was suggested that I try events. So here is the standard flow I'll need: 1. User enter UserId &...

Part and Inventory Search

Back
Top