Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9100577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:54:07+00:00 2026-06-17T00:54:07+00:00

I’m trying to query on on field in one table where it is LIKE

  • 0

I’m trying to query on on field in one table where it is LIKE a field in another table but am having trouble getting valid results.

I want to find the Pager_ID in tbl_Emergin_Current_Device_Listing_20121126 where it is like the Pager_ID in tbl_AMCOM_PROD.

Some relevant information:

  • Pager_ID in tbl_Emergin_Current_Device_Listing_20121126 is at most 10 characters and are always numeric characters (example of 10 character Pager_ID: 3145551212).
  • However, Pager_ID in tbl_AMCOM_PROD can be alpha-numeric (3145551212@att.txt.com, which would be the same user.
  • All data is stored as text.

I want to be able to find “3145551212@att.txt.com” in tbl_Amcom_Prod.Pager_ID when “3145551212” is present in tbl_Emergin_Current_Device_Listing_20121126.Pager_ID. However, with the code below I’m only finding exact matches (EQUAL instead of LIKE).

current code:

SELECT DISTINCT tbl_emergin_current_device_listing_20121126.userrecno,
            tbl_emergin_current_device_listing_20121126.username,
            tbl_emergin_current_device_listing_20121126.department,
            tbl_emergin_current_device_listing_20121126.carriername,
            tbl_emergin_current_device_listing_20121126.protocol,
            tbl_emergin_current_device_listing_20121126.pin,
            tbl_emergin_current_device_listing_20121126.pager_id,
            Iif([tbl_amcom_group_call_leads_and_id].[amcom listing msg id], 
                [tbl_amcom_group_call_leads_and_id].[amcom msg group id], 
                [tbl_amcom_prod].[messaging_id]) 
                AS [Amcom Messaging or Message Group ID]
FROM   ((tbl_emergin_current_device_listing_20121126
     LEFT JOIN tbl_amcom_prod
            ON tbl_emergin_current_device_listing_20121126.pager_id =
               tbl_amcom_prod.pager_id)
    LEFT JOIN tbl_amcom_group_call_leads_and_id
           ON tbl_emergin_current_device_listing_20121126.pager_id =
              tbl_amcom_group_call_leads_and_id.[ams group call lead])
   LEFT JOIN tbl_deactivated_pager_list
          ON tbl_emergin_current_device_listing_20121126.pager_id =
             tbl_deactivated_pager_list.[pager number]; 

Sample Results:

UserRecNo   UserName    Department  CarrierName Protocol    PIN PAGER_ID    Amcom Messaging or Message Group ID

43  Brown, Lewis    BJH Verizon 0   3145550785  3145550785  3145550785
52  Wyman, Mel  BJH Airtouch (Verizon) (SNPP)   3   3145558597  3145558597  3145558330

I’d also like to see this record but am not with current code:

57  Johnson, Mick   BJH AT&T    3   3145551234  3145551234@att.txt.com  3145559876

What change should I be making?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:54:08+00:00Added an answer on June 17, 2026 at 12:54 am

    Something like:

     SELECT Pager_ID 
     FROM tbl_Amcom_Prod a
     LEFT JOIN  [tbl_Emergin_Current_Device_Listing_20121126] b
     On a.Pager_ID  & "*" Like b.Pager_ID 
    

    This will only work in SQL view, not design view.

    You could also use a mixture of Instr & Mid.

    SELECT IIf(InStr([Pager_ID] & "",".")>0,
               Mid([Pager_ID],1,InStr([Pager_ID],".")-1),[Pager_ID ]) AS PID
    FROM [tbl_Amcom_Prod]
    WHERE IIf(InStr([Pager_ID] & "",".")>0,
               Mid([Pager_ID],1,InStr([Pager_ID],".")-1),[Pager_ID]) 
               In (SELECT Pager_ID 
                   FROM [tbl_Emergin_Current_Device_Listing_20121126])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.