MySQL to Tally

Professional Edition

udiMagic Professional edition supports import of data from MySQL database to Tally Prime. It supports :


Getting Started

How do I transfer data from MySQL database into Tally ?
Before we proceed, let's have look at the steps involved in Excel to Tally vs MYSQL to Tally.

Steps Import from Excel to Tally Import from MYSQL to Tally Remarks
Step 1 Start udiMagic Software Start udiMagic Software
Step 2 Select option Excel to Tally Select option Advanced Usage
Step 3 Select option Import data into Tally Select option MYSQL [MYSQL to Tally]
TODO : Specify the MySQL Settings to connect to the MySQL database
Step 4 Select the Excel file Select the Query file [Excel to tally]
Select any Standard Excel template provided with udiMagic Software.
Example: Vouchers-Sales-Purchase-Basic.xls

[MYSQL to Tally]
TODO : Write SQL SELECT statement to retrieve data from your database tables. Your SELECT query should return the same columns as given in the Standard Excel template.
Step 5 Select the XML file
[Optional - XML file is automatically selected]
Select the XML file
[Mandatory]
Each Standard Excel template provided with udiMagic has a corresponding XML file.

Here's an example:
Excel file: Vouchers-Sales-Purchase-Basic.xls
XML file : Vouchers-Sales-Purchase-Basic-xml-tags.xml
Step 6 Click the Start button Click the Start button

As it can be seen, the above task to import from MySQL to Tally involves two main things:-

  1. To specify MySQL Server Settings to connect to MySQL database
  2. To write SQL-SELECT statements to fetch data from the MYSQL database
CAUTION

Though use of udiMagic does not require any programming knowledge, you need to have understanding of SQL (Structured query Language). And Of-course, you must have the rights / privileges to access the MySQL database.


MySQL Server Information
Follow these steps :-

Remarks:-
a) The udiMagic Demo version comes with default values for MySQL database. These values (IP address; database-name etc) refer to Shweta Software's MySQL 5.x database named "scdatabase".
b) Access to the MySQL "scdatabase" is provided for Demo purpose only.
c) Users can specify their MySQL database details and test-check it.


Writing SQL-SELECT statements

After you have test-checked the connection to your MySQL database, you need to write SQL statements (queries) to fetch data from MySQL.

Sample file provided with udiMagic Software :- MySQL-GST-Sales.qry

<SQL.LIST>
<SQL>SELECT vchno as id,basevtype,vchtype,vchno,vchdate,refno,refdate,partyname,partygstin,statename,itemname,hsncode,uom,qty,rate,discount,amount,igstrate,igstamt,cgstrate,cgstamt,sgstrate,sgstamt,salepurcledger,igstledger,cgstledger,sgstledger,narration FROM gstdata</SQL>
</SQL.LIST>

Remarks:
a) You must write SQL SELECT to select appropriate fields from your database tables.
b) Save the SQL Query in a file with extension qry.
c) If required, please consult your system administrator to write SQL SELECT statement.

Additional notes:
SQL-queries are generally written in a Text file (having .qry extension). You can use any TEXT-editor (like Notepad) to view/edit the SQL-query files. udiMagic allows you to write multiple SQL-SELECT statements in a Query (qry) file. As you can see, each SQL-SELECT statement is to be enclosed in .... tag. This allows you to have multiple queries in a single Query (txt) file. udiMagic processes these queries one-by-one in the order in which they appear in the query-file. It contructs a result data-set which can be visualized as Columnar format comprising of Rows and Columns. The first field in the result data-set can be accessed using COLUMNREFERNCE A, the second field in the result data-set can be accessed using COLUMNREFERENCE B and so on.


MySQL to Tally video