Search results

  1. M

    Using OR in a query

    I’m looking for records where the SOURCE_BATCH=I and DT_DISTRIBUTE between 10/01/2010 and 10/31/2010 Or SOURCE_BATCH=I and DT_DISTRIBUTE is null and STATUS_RECEIPT IS = H The query below seems to be ignoring what is in the OR section of the query. I’ve tried changing the DT_DISTRIBUTE to...
  2. M

    If Null

    Sorry, here you go. Mike
  3. M

    If Null

    OK I'm attaching a DB with about the same data and fields
  4. M

    If Null

    I'm sorry, before I saw your request for a copy of the DB I had deleted it and dumped the trash. I've started all over and I'll let you know if I run into problems with this one. Thanks to everyone for all your attention to this. Mike
  5. M

    If Null

    Yea, I caught that also, but still doesn't work. Time to go home for the day. I'm going to start everthing over tomorrow and see if I can figure it out. Thanks for everyones help. Mike
  6. M

    If Null

    I tried running that code and got an error "Data type mismatch in criteria expression" This won't work either SELECT [DISTRICT OFFICE].DO, Count(*) AS CASES FROM [DISTRICT OFFICE] LEFT JOIN [CASE TYPE AND EST] ON [DISTRICT OFFICE].DO = [CASE TYPE AND EST].DO GROUP BY [DISTRICT OFFICE].DO, [CASE...
  7. M

    If Null

    Something is still wrong - still not giving me all the districts SELECT [DISTRICT OFFICE].DO, Count(IIf(IsNull([CASE TYPE AND EST].CASE),0,[CASE TYPE AND EST].CASE)) AS CASES INTO [TANF P] FROM [DISTRICT OFFICE] LEFT JOIN [CASE TYPE AND EST] ON [DISTRICT OFFICE].DO = [CASE TYPE AND EST].DO...
  8. M

    If Null

    I tried this and got the same results, still not what I'm looking for. SELECT [CASE TYPE AND EST].district, Count([CASE TYPE AND EST].CASE) AS CASES INTO [TANF P] FROM [CASE TYPE AND EST] WHERE [CASE TYPE AND EST].[CASE TYPE]="A" AND [CASE TYPE AND EST].[EST TYPE]="P" OR [CASE TYPE AND...
  9. M

    If Null

    When I run this query I get the results of the number of cases in each District that are [CASE TYPE]="A" AND [EST TYPE]="P" If the District has no cases that meet this criteria the the District is not included in the results. What I want is to have that District included in the results with...
  10. M

    Don't add up

    OK, I'll look that way. Thanks
  11. M

    age today from DOB

    Thanks Bob
  12. M

    age today from DOB

    Back to the drawing board......
  13. M

    Don't add up

    I have this query and when run it returns the incorrect total for DISTRICT OFFICE. Here is the query and below that are the results for each line. Would someone tell me what I'm doing wrong please? SELECT [CASE TYPE].DO, Format(Now(),"mmmm yyyy") AS [MONTH], [TANF EST O].[TANF O], [TANF...
  14. M

    age today from DOB

    Thanks all I just used DateDiff with the DOB and today's date
  15. M

    age today from DOB

    I know todays date and I have the DOB how do I get the age from this information. I tried =NOW()-DOB = AGE and I get something returned like this, 777454.3434. I only want the age today.
  16. M

    Returnrecords where field not 16

    That did it -- thanks for the help! Mike
  17. M

    Returnrecords where field not 16

    I want to write a query to select records in a table where the ORDER ID field doesn't contain 16 characters. In the sample data below the only records that should be returned would be: AA ///////000AX/// 04120221P///////// FM-2008-00555 AA/////// 000AX/// 20030377P///////// FM-99-021 1 OF 1...
  18. M

    Have query return yes or no

    Is there a way to have this query insert a "Y" in the EMPLOYMENT_HISTORY.EMPLOYER_ID if there is an EMPLOYMENT_HISTORY.EMPLOYER_ID and a "N" in the EMPLOYMENT_HISTORY.EMPLOYER_ID if there is no EMPLOYMENT_HISTORY.EMPLOYER_ID ? Thanks, SELECT [1 ALL OPEN CASES].DO, [1 ALL OPEN...
  19. M

    IIf question

    This is a working query. What I would like to do is display a Y or N in these fields [NOLDBA_INT_ADDRESS_HISTORY.DATE_END, NOLDBA_INT_EMPLOYMENT_HISTORY.DATE_END] depending on if the field is null (12/31/9999). If the field is 12/31/99 I want the query to enter a Y in that field and if the...
  20. M

    Compile Error

    Got it, thanks for everyones help.
Back
Top Bottom