rtslink.com
Home / RTSlink DLL / More on Tally Integration / SQL-SELECT

Using SQL-SELECT to pull data from Tally Software



 SAMPLE 1

 SELECT statement to retrieve Vouchers details from Tally in specific format as given below:- 

 SELECT $Date, $$CollectionField:$LedgerName:1:AllLedgerEntries,$VoucherTypeName,$VoucherNumber,
        $$IsDr:$Amount,$$IsCr:Amount FROM RTSAllVouchers

Output format:-

Date Ledger VoucherTypeName VoucherNumber DrAmount CrAmount
20080401 Cash Pyament 1 -500 500


SAMPLE 2

SELECT statement to retrieve Vouchers details including Stock-item details from Tally in specific format as given below:- 

SELECT $Date,$VoucherTypeName,$VoucherNumber,$Amount,$Narration, 
       $$FullList:AllLedgerEntries:$LedgerName,
       $$FullList:InventoryEntries:StockItemName, 
       $$FullList:InventoryEntries:$BilledQty,
       $$FullList:InventoryEntries:$Rate 
       FROM RTSAllVouchers


Output format:-

Date VoucherTypeName VoucherNumber Amount Narration Ledgers StockItemNames Qty Rate
20080401 Sales 1 500 Cash, Sales Bush 1 500
    
Tally is a registered trademark of Tally Solutions FZ LLC.

Valid HTML 4.01 Transitional