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

  • Home
  • SEARCH
  • 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 3346094
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:15:47+00:00 2026-05-18T01:15:47+00:00

There are a limit to use INNER JOIN? Original Query (Work just fine) I

  • 0

There are a limit to use INNER JOIN?

Original Query (Work just fine) I got 77 rows affected

    SELECT atendimento.id, atendimento.responsavel, atendimento.ocorrencia, 
           atendimento.idcontrato, cliente.nome as clinome, cliente.id as cliid, 
           atendimento.d_ini, usuario.apelido, tipos.descricao, tipos.id as tip 
      FROM atendimento 
INNER JOIN cliente ON atendimento.cliente=cliente.id 
INNER JOIN usuario ON atendimento.usuario=usuario.id 
INNER JOIN tipos ON atendimento.status=tipos.id 
     WHERE 1=1 AND (atendimento.status=10 OR atendimento.status=11) 
  ORDER BY tipos.id, atendimento.d_ini ASC

New Try: (Not working very well) it is limited to only 17 rows affected. The result here is the same except for the only 17 rows returned in my query.

    SELECT atendimento.id, atendimento.responsavel, atendimento.ocorrencia, 
           atendimento.idcontrato, atend_os.protocolo, atend_os.tecnico, 
           cliente.nome as clinome, cliente.id as cliid, atendimento.d_ini, 
           usuario.apelido, tipos.descricao, tipos.id as tip 
      FROM atendimento 
INNER JOIN atend_os ON atendimento.id=atend_os.protocolo 
INNER JOIN cliente ON atendimento.cliente=cliente.id 
INNER JOIN usuario ON atendimento.usuario=usuario.id 
INNER JOIN tipos ON atendimento.status=tipos.id 
     WHERE 1=1 AND (atendimento.status=10 OR atendimento.status=11) 
  ORDER BY tipos.id, atendimento.d_ini ASC

What is going wrong here? does someone know why the result change?

Thanks a lot for any info!

  • 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-05-18T01:15:47+00:00Added an answer on May 18, 2026 at 1:15 am

    try

     SELECT atendimento.id, atendimento.responsavel, atendimento.ocorrencia, 
               atendimento.idcontrato, atend_os.protocolo, atend_os.tecnico, 
               cliente.nome as clinome, cliente.id as cliid, atendimento.d_ini, 
               usuario.apelido, tipos.descricao, tipos.id as tip 
          FROM atendimento 
    INNER JOIN cliente ON atendimento.cliente=cliente.id 
    INNER JOIN usuario ON atendimento.usuario=usuario.id 
    INNER JOIN tipos ON atendimento.status=tipos.id 
    LEFT JOIN atend_os ON atendimento.id=atend_os.protocolo 
         WHERE 1=1 AND (atendimento.status=10 OR atendimento.status=11) 
      ORDER BY tipos.id, atendimento.d_ini ASC
    

    and see how many rows have atend_os.protocolo = NULL

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

Sidebar

Related Questions

This is kinda weird. I have the next query: SELECT * , GROUP_CONCAT( x.tag
Is there a max limit to the number of bytes you can allocate to
How can I make an ORDER BY clause with a small LIMIT (ie 20
I am using in C# MYsql .I have query that works if I run
I have a query where I am doing an Order by inside of a
I have a SQL query that isn't table-specific and I don't know how to
I am using Semaphore to limit the number of concurrent instances my application can
There is a homework I should do and I need help. I should write
Its my first post and I'm really rusty on MSSQL so be gentle :-)
I've tried in 1 hour now, trying to find out how I could extract

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.