Avatar of Roberto Parker
Roberto Parker
Flag for Mexico

asked on 

Sql in a join 2 diffrenet value rquires form same table

I have an ms sql query

select * from pass left join respuestas where pass.id=respuestas.id
The respuestas record points to pass and I can retrieve any field value from pass or respuestas from the generated recordset.

But the respuestas table has another value say idx that ponts to adifferent pass record. I need a value from the pass table.right now I am retrieveibg the value individually when required. it consumes a lot of resources. Is there a way ad add it to the recordset or somethng like
select * from pass left join respuestas where pass.id=respuestas.idx but I have to match the records. I am at a loss



Microsoft SQL Server

Avatar of undefined
Last Comment
Dustin Saunders

8/22/2022 - Mon