Hi guys,

Today the costumer asked me to add something to the report section of program. (crystal reports)
I have to query from another table but the field names all the same on both.

I am a little confused on the sql query that should be used. This is currently the old one being used :
Code:
strSQL = "SELECT tbldaftar.FldNosabt, tbldaftar.FldSDate, tbldaftar.FldCodeMabda, tbldaftar.Fldno_post, tbldaftar.FldVahedName FROM tbldaftar WHERE Fldno_post = '" & frmmain.txtPPostCode.Text & "' ORDER BY FldCodeMabda"
I explain how data works and what exactly I want :

Main Table named 'tbldaftar'
----------------------------
FldNosabt
FldSDate
FldCodeMabda
FldNo_post
FldVahedName

Second Table named 'TblRonevesht' (which has to be added to sql query)
----------------------------
FldNosabt
FldCodeMabda
FldVahedName


As you can see second table has the same field name from the main one. but the data is different. they have one field in common which has the same data named 'FldNosabt'

Let me write down an example how the report output might be:

1.User enters number '12' in textbox and then clicks the report button

2.My program query the database and there is 1 record in the main table with field values : (FldNo_post) = 12 and (FldNosabt) = 500

In the second table there is 2 record which has : (FldNosabt) = 500

3.In crystal reports, the output results should be 3 records. ( 1 from the main table and 2 from second table )


Is it a simple Inner Join ? How should get data from those two table which has same field names ? Please Help me out.