J
jamiechen168
Hello,
I used Ctrl+F9 to insert a database successfully. This is mainly
because Mail Merge takes only one data source and I need to use
Database command to insert another set of data.
{ DATABASE \d "C:\\Mytemp\\Office\\OrderData2-Data.csv" \c "" \s
"SELECT Invoice_ID, Invoice_Description, Amount FROM
C:\\Mytemp\\Office\\OrderData-Data.csv" \l "1" \b "191" \h \*
MERGEFORMAT }
"OrderData2-Data.csv" is like this
Order ID Amount
1 10
2 99
What I need to to is to use SUM formula to calculate the total amount
of the above database. I tried to set a Bookmark and use formula and I
cannot get it work, can someone give me a direction on how to get it
working?
This is what I tried so far
- Use SET command to create a bookmark
{ SET TABLE1 { DATABASE \d "C:\\Mytemp\\Office\\OrderData2-Data.csv"
\c "" \s "SELECT Invoice_ID, Invoice_Description, Amount FROM
C:\\Mytemp\\Office\\OrderData-Data.csv" \l "1" \b "191" \h \*
MERGEFORMAT } }
- Then use SUM formula
{ =SUM(TABLE1 B2:B4) }
And I still cannot get it work. Please help
Many thanks
I used Ctrl+F9 to insert a database successfully. This is mainly
because Mail Merge takes only one data source and I need to use
Database command to insert another set of data.
{ DATABASE \d "C:\\Mytemp\\Office\\OrderData2-Data.csv" \c "" \s
"SELECT Invoice_ID, Invoice_Description, Amount FROM
C:\\Mytemp\\Office\\OrderData-Data.csv" \l "1" \b "191" \h \*
MERGEFORMAT }
"OrderData2-Data.csv" is like this
Order ID Amount
1 10
2 99
What I need to to is to use SUM formula to calculate the total amount
of the above database. I tried to set a Bookmark and use formula and I
cannot get it work, can someone give me a direction on how to get it
working?
This is what I tried so far
- Use SET command to create a bookmark
{ SET TABLE1 { DATABASE \d "C:\\Mytemp\\Office\\OrderData2-Data.csv"
\c "" \s "SELECT Invoice_ID, Invoice_Description, Amount FROM
C:\\Mytemp\\Office\\OrderData-Data.csv" \l "1" \b "191" \h \*
MERGEFORMAT } }
- Then use SUM formula
{ =SUM(TABLE1 B2:B4) }
And I still cannot get it work. Please help
Many thanks