I have this table, which the concept name field is the id of another table, but I need to make a query where instead of showing me the id show me the concept name of the other table.
select
IdFormulacion,
NombreConcepto,
precio,
cantidad,
total,
Nota
from Formulacion
I thought I would do it in the following way, as you can see the other table is one that is called Concepto_Gastos
, there is also another table in which you have concept names that you will not find in this concept of expenses, how can I solve this , that those id look for them in the two tables and instead of showing me the id in the query show me the name of a concept, I need it to perform a stored procedure and print it in a query crystalReports c # .
In the query below it stirs up the fields, and does not show all, as it gets confused.
select
Concepto_Gastos.
NombreConcepto,
precio,
cantidad,
total,
Nota
from Formulacion
Inner join[Concepto_Gastos] on Formulacion.IdFormulacion = [Concepto_Gastos].idConceptoGastos