Results 1 to 6 of 6

Thread: Match Problem

  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Match Problem

    My criteria in query is:
    where outlet in [tbl_events].[PPV_Outlet]
    Outlet type is text and [tbl_events].[PPV_Outlet] type is number is there any way by which i can match the values.

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    convert 1 to the other in the comparison ... Is the Outlet type's data strictly numeric?
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jul 2006
    Posts
    157
    Yes its a number

  4. #4
    Join Date
    Jul 2006
    Posts
    157
    and i save data in table1.outlet like 1,2,3

  5. #5
    Join Date
    Jul 2006
    Posts
    157
    This also dont works
    AND ((LastValidTech.outlet) In (SELECT str(PPVVOD_Outlet) FROM [tbl_events])));
    --------------------------------------------------------------------

    SELECT tbl_PPVResearch.TicketNum, LastValidTech.Account1, tbl_Events.txt, tbl_Events.PPVVOD_Amt, LastValidTech.Account2, LastValidTech.Account3, LastValidTech.Account4, LastValidTech.LstVldTech, tech_id.TECHCONT, tech_id.CORP, tbl_PPVResearch.RequestDate
    FROM ((LastValidTech INNER JOIN tbl_PPVResearch ON LastValidTech.TicketNum = tbl_PPVResearch.TicketNum) INNER JOIN tbl_Events ON tbl_PPVResearch.TicketNum = tbl_Events.TicketNum) INNER JOIN tech_id ON LastValidTech.LstVldTech = tech_id.TECH
    WHERE (((tech_id.CORP)=Val(Left([LastValidTech].[Account1],5))) AND ((tbl_PPVResearch.RequestDate) Between [Forms]![frm_Admin]![text33] And [Forms]![frm_Admin]![text35]) AND ((tbl_PPVResearch.Status)="Complete") AND ((LastValidTech.outlet) In (SELECT str(PPVVOD_Outlet) FROM [tbl_events])));

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    As mentioned here:
    http://www.dbforums.com/showthread.php?t=1609182
    this is the sort of problem you encounter when you don't normalise. I think your IN clause is the wrong way round (as well as just plain wrong). A way round this is a WHERE clause like:
    Code:
    WHERE "," & [tbl_events].[PPV_Outlet] & "," LIKE "*," & outlet & ",*"
    This will be slow and it is clearly cumbersome. As mentioned (and to reiterate ) normalise your schema.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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