Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Chernov
Creator
Creator

SQL Select with Join

Hello,

i have 3 tables in sql base: chequehead, chequepos and chequedisc

Clipboard02.jpg

where:

chequepos.chequeid = chequehead.id

chequedisc.posid = chequepos.id

in QV - how i can select data from this tables with one condition on one table - chequehead.dateoperation ?

1 Solution

Accepted Solutions
vikasmahajan

Please try following

select * from [SES].[dbo].[ChequeHead] a

left join [SES].[dbo].[ChequePos]  b on  a.id = b.chequeid

left join [SES].[dbo].[ChequeDis]   c on  b.id = c.rowid

Please note in your query b.column name & c.column name as per requirement you can take. Also sure count the # of records

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

1 Reply
vikasmahajan

Please try following

select * from [SES].[dbo].[ChequeHead] a

left join [SES].[dbo].[ChequePos]  b on  a.id = b.chequeid

left join [SES].[dbo].[ChequeDis]   c on  b.id = c.rowid

Please note in your query b.column name & c.column name as per requirement you can take. Also sure count the # of records

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.