Results 1 to 11 of 11

Thread: Query Question

  1. #1
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am trying to design a query that would do the following. In the DB is a table that has the following fields claim number, proc code, alt proc code, and paid. In the query I want to design, I am trying to isolate claims that have either codes between 80000 and 89999 in the proc code field or alt proc code field and no other codes on the claims.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Can there be multiple records with the same claim number?

  3. #3
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='761235' date='25-Feb-09 01:15']Can there be multiple records with the same claim number?[/quote]


    Yes, I tried to upload DB but I received a message that said unable to upload this type of file.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Have you tried zipping the database and uploading the zip file?

  5. #5
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='761241' date='25-Feb-09 01:25']Have you tried zipping the database and uploading the zip file?[/quote]
    Here is the zipped file. Thanks
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    So if Proc Code is (for example) 85000, Alt Proc Code in the same record should be blank? Or is it OK if Alt Proc Code is any value in the same record?

  7. #7
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='761254' date='25-Feb-09 01:52']So if Proc Code is (for example) 85000, Alt Proc Code in the same record should be blank? Or is it OK if Alt Proc Code is any value in the same record?[/quote]
    yes, there can be be 3 digit codes in either field but those will not affect the results.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    There is a serious problem: your codes look like numbers but the fields are text fields. Is that just an error in your sample database, or does it reflect the real situation?

    (As a text value, "85" is between "80000" and "89999" !)

  9. #9
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='761267' date='25-Feb-09 02:23']There is a serious problem: your codes look like numbers but the fields are text fields. Is that just an error in your sample database, or does it reflect the real situation?

    (As a text value, "85" is between "80000" and "89999" !)[/quote]
    I forgot that this field is like that because alphanumeric codes and can be in those fields. Let me see if there is another way that I can do that.

  10. #10
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='benji' post='761283' date='25-Feb-09 01:44']I forgot that this field is like that because alphanumeric codes and can be in those fields. Let me see if there is another way that I can do that.[/quote]
    Could we base base it on the 3 digit codes for those 80000 codes will always be between 300 and 310 in the opposite column from the code?

    Example


    Proc code alt proc code

    80000 310

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Could you explain precisely and unambiguously what the conditions are?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •