Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to join two table and get best result?

$
0
0

hi all

i have 2 tables

first table is:

DetailAccount 

SELECT * FROM DetailAccount

i see this resut

Code                 Title

113                    test13

114                    test14

115                    test15

-----------------------------------

select * from VoucherItem

Result Is:

GacFirstDetailAccountRef             GacSecondDetailAccountRef    GacThirdDetailAccountRef   debit        credit

113                                                114                                          115                                   25.000       0

------------------------------

i want see this result

GacFirstDetailAccountRef      title1       GacSecondDetailAccountRef   title2  GacThirdDetailAccountRef   title 3 debit        credit

 113                                     test13          114                                   test14             115                       test15   25.000      0

how to join 2 tables

please help me

thanks all



Name of Allah, Most Gracious, Most Merciful and He created the human


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>