none
Invoice Details

    Pertanyaan

  • Hi,

    I have two table of receipt <g class="gr_ gr_50 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Punctuation multiReplace" data-gr-id="50" id="50">..</g>

    ReceiptID    RecDate    RefNo    Premise    FlatNo    Tenant    Narration    ActType    Notes    Amount    PaidAmount              ContractID
    3041    2018-05-21        City Complex    101    Shahil        BANK ACCOUNT                         1300.000    0.000      CT-00001
    3042    2018-05-29        City Complex    102    John        CASH ON HAND                                 500.000    0.000      CT-00002

    and other one

    ID    InvNO    TenancyID    FromDate    ToDate    Amount    PaidAmount
    5219    3513    3041    2018-05-01    2018-06-01    300.000    300.000
    5220    3514    3041    2018-06-01    2018-07-01    300.000    300.000

    <g class="gr_ gr_99 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="99" id="99">i</g> want to join  and show as

    <g class="gr_ gr_298 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="298" id="298">receiptid</g>  <g class="gr_ gr_167 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="167" id="167">fromdate</g>  amount  <g class="gr_ gr_291 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="291" id="291">ReceivedAmt</g>

    3041         2018-05-01  sum(300)                          it should be sum(amount) group by <g class="gr_ gr_434 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="434" id="434">tenencyiD</g> of <g class="gr_ gr_489 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="489" id="489">secondtable</g>

    3041         2018-05-01  null     1300

    thank you


    29 Mei 2018 12:48

Semua Balasan

  • Hello Prem Sahani,

    I cleaned up your post a little bit:

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

    I have two table of receipt

    ReceiptID    RecDate    RefNo    Premise    FlatNo    Tenant    Narration    ActType    Notes    Amount    PaidAmount       ContractID
     3041    2018-05-21        City Complex    101    Shahil        BANK ACCOUNT                     1300.000    0.000          CT-00001
     3042    2018-05-29        City Complex    102    John          CASH ON HAND                      500.000    0.000          CT-00002
    

    and other one

    ID    InvNO    TenancyID    FromDate    ToDate    Amount    PaidAmount
     5219    3513    3041    2018-05-01    2018-06-01    300.000    300.000
     5220    3514    3041    2018-06-01    2018-07-01    300.000    300.000

    i want to join  and show as

    receiptid fromdate    amount  ReceivedAmt
    3041      2018-05-01  sum(300)                          
    
    --it should be sum(amount) group by tenencyiD of second table
    
    3041      2018-05-01  null     1300

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


    You want to Join these two tables, but do you want the JOIN to be in the database? Or did you want to do this in LINQ? And, are you already displaying this on a Form?


    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    29 Mei 2018 14:04
  • Hi Prem,

    What the type of your database is? SQL Server database? Or Access database? Or other...

    Do you want to join the two tables in database? Or show them in some places. Did you use the Winform project?

    Please provide more details for your question.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    30 Mei 2018 6:40