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 8878599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:45:01+00:00 2026-06-14T19:45:01+00:00

i have this query which i use to match two tables, now, i match

  • 0

i have this query which i use to match two tables, now, i match the tables only by the time, so, which means, the time field in retailer table is 5 seconds earlier then the time field in imovo table. What i already need to achieve is:

When i insert a retailer row, i add info like retailer time, retailer epos_id
When i insert imovo row, i add info like imovo time, imovo rpos_id
I also have a table rbpos_epos which has matching rbpos_id and epos_id i.e

table retailer:
time     |    epos_id
12:23:34   ea12

table imovo
time     |    rbpos_id
12:23:29      ra12

table rbpos_epos
id  | epos_id  |   rbpos_id
1       ea12         ra12

When i match retailer with imovo, i want also to check whether their respective rbpos_id and epos_id match in the rbpos_epos table.. i mean, if they are a pair, if they have the same id..

here’s the query i currently use

SELECT retailer.date, retailer.time, retailer.location, retailer.user_id,imovo.mobile_number ".
 "FROM retailer LEFT JOIN imovo ".
    " ON addtime(retailer.time, '0:0:50')>imovo.time
AND retailer.time <imovo.time AND retailer.date=imovo.date
" 
  • 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-14T19:45:03+00:00Added an answer on June 14, 2026 at 7:45 pm

    Try joining all three tables SQL Fiddle

    select r.`time`, r.`epos_id`,
           i.`time`, i.`rbpos_id`
    from retailer r
    join rbpos_epos re on r.epos_id = re.epos_id
    join imovo i on i.rbpos_id = re.rbpos_id
                 and addtime(r.`time`, '0:0:50') > i.`time`
                 and r.`time` < i.`time`
                 and r.`date` = i.`date`;
    

    Add columns in select as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query which is a dependant query and taking much execution time
Right now I have this SQL query which is valid but always times out:
i have this three tables Retailer, imovo, rbpos_epos. What i do is i match
I have this query which on executing in my sql command line client executes
I have this query which groups the results by ORDER#. SELECT ORDER#, MAX(SHIPDATE -
I have this query which works correctly in MySQL. More background on it here
I have this query which returns a result set with Date(column) as nvarchar datatype.
I have this query, which is giving me some problems... I am trying to
I have this query. It matches anything which has South in its name. But
in my self-defined module I have this method which will query the db and

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.