1
I have an application that should show in a dbgrid only id that is equal to the service order and that has the same id in another table:
To ID_OrdemServico
comes from the table ordem_servico
by foreign key to pecas_ordem_servico
, would like to show the used parts only where the Ids were equal
below the code that at the moment shows all the records:
select * from pecas_ordem_servico
where pecas_ordem_servico.id_OrdemServico = Id_OrdemServico
Opa, I was confused with the names/ids of the tables, but try ai: select * from pecas_ordem_servico Where pecas_ordem_servico.Id_ordemservico = ordem_servico.Id_ordemservico, to no celular hahaha se funciona avisa q revemos!
– Junior Moreira