globalware via odbc
DESCRIPTION
GlobalWare via ODBC. Agendum. DBISQLC – the other white meat What, why, how Some things you may not know about using ODBC and/or Access Linking tables Null vs empty/blank Invoices with comments and without comments Prompts Parsing fields Report by month, by day of week - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/1.jpg)
GlobalWare via ODBC
![Page 2: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/2.jpg)
2
Agendum
> DBISQLC – the other white meat• What, why, how
> Some things you may not know about using ODBC and/or Access• Linking tables
• Null vs empty/blank
• Invoices with comments and without comments
• Prompts
• Parsing fields
• Report by month, by day of week
• Segments with invoice data (e.g., commission)
• Agent name
![Page 3: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/3.jpg)
3
DBISQLC
> Aka ISQL (“eye see kwul”)
> What is it?• Interactive Structured Query Language
• Native commands – direct access to gblware.db
• Installed with GlobalWare client
> Why?
1. Some things you can’t do in tools like Access
2. Sometimes easier
3. Can see nulls
4. You can use the F9 key
![Page 4: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/4.jpg)
4
DBISQLC
> How?
1. Start, Run, DBISQLC
2. Login as GLOBAL or EDIT and password. Select Gblware32 for Data source name.
![Page 5: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/5.jpg)
5
DBISQLC
> List the Account Ids associated with a Report To Id
> In Access, you’ll get a line for each Account Id
> In DBISQLC, you can get one line for each Report To Id
select ReportToId, list(AccountId) as Accts
from dba.customer
group by ReportToId
order by ReportToId
![Page 6: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/6.jpg)
6
DBISQLC
> Results display, but you can export to file
select ReportToId, list(AccountId) as Accts
from dba.customer
group by ReportToId
order by ReportToId;
Output to c:\rptid.txt
![Page 7: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/7.jpg)
7
Microsoft Access
> Linking tables• Important to select correct fields for primary key
– Comments, InvPayId and LineNum
– Primary key for each table listed in Print DB Structure
• If you get ODBC call failed, try relinking the table
![Page 8: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/8.jpg)
8
Null vs Empty
> Empty/blank: initialized but containing a zero-length value.
> Null: uninitialized or containing no value, not even a zero-length value.
> GlobalWare is not always consistent
> You can see nulls in ISQL but not in Access
![Page 9: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/9.jpg)
9
Null vs Empty
> ISQL
select doctype, traveler, * from dba.invoice
where invoicedate = '2007-08-31' and traveltype = 'a'
and (doctype <> 'exc' or doctype is null)
![Page 10: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/10.jpg)
10
Null vs Empty
> Microsoft Access
![Page 11: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/11.jpg)
11
Microsoft Access
> Some things you may not know about using Access• Prompts
![Page 12: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/12.jpg)
12
Prompts - Microsoft Access
> Prompt for variable data, like date range• Enter in square brackets [ … ]
• Text within displays to user
> For non-text fields, set up parameters• Validates data at entry
![Page 13: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/13.jpg)
13
Prompts - Microsoft Access
![Page 14: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/14.jpg)
14
Microsoft Access
> Some things you may not know about using Access• Invoices with comments and without comments
![Page 15: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/15.jpg)
15
Invoices with comments and without comments
> Access – two queries• Query of the comment lines for the specific number
• Query of Invoice table and the 1st query
> ISQL – query with subquery• Query of Invoice table
• Subquery of the comment lines for the specific number
![Page 16: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/16.jpg)
16
With/without comments - Microsoft Access
![Page 17: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/17.jpg)
17
With/without comments – Microsoft Access
![Page 18: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/18.jpg)
18
With/without comments – ISQL
select number(*),
(select data from dba.comments where invpayid = payid and linenum = 92) as Data92,
* from dba.invoice
where invoicedate between '2007-08-31' and '2007-08-31‘ and status <> 'v'
order by data92
![Page 19: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/19.jpg)
19
With/without comments – Microsoft Access
> Easy to go from here to find missing comments
> Data is null
![Page 20: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/20.jpg)
20
With/without comments - ISQL
select (select data from dba.comments where invpayid = payid and linenum = 92) as Data92,
* from dba.invoice
where invoicedate = '2007-08-31'
and data92 is null
But easier:
select * from dba.invoice
where invoicedate = '2007-08-31'
and payid NOT in (select invpayid from dba.comments where linenum = 92)
![Page 21: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/21.jpg)
21
Microsoft Access
> Some things you may not know about using Access• Parsing fields
![Page 22: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/22.jpg)
22
Parsing Fields - Microsoft Access
> Get part of a field, e.g.• original ticket number on an exchange is in Savings comment
‘EX – 1234567890’
• Last 4 digits of credit card number
> LEFT, RIGHT, MID
![Page 23: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/23.jpg)
23
Parsing Fields - Microsoft Access
![Page 24: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/24.jpg)
24
Parsing Fields - Microsoft Access
> More examples
Department: Left(Sort1,1)
DeptNum: Mid(Sort1, 3, 4)
CreditCard: ‘********’ & Right(CCNumber, 4)
![Page 25: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/25.jpg)
25
Parsing Fields - Microsoft Access
> Special functions for parsing dates
> Allows, for example• Month by month sales totals
• How much business do I do on the weekend?
![Page 26: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/26.jpg)
26
Parsing Fields - Microsoft Access
> Get the month from a date:• InvMonth: Month([invoicedate]) 1 - 12
• InvMonth: Format([invoicedate],'mmm') Jan - Dec
• InvMonth: Format([invoicedate],'mmmm') January - December
> You need one to sort on and one to print
> If spanning years, need year and month for sorting
![Page 27: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/27.jpg)
27
Parsing Fields - Microsoft Access
> Get the weekday from a date:• InvDay: weekday([invoicedate]) 1 - 7
• InvMonth: Format([invoicedate],‘ddd') Sun - Sat
• InvMonth: Format([invoicedate],‘dddd') Sunday - Saturday
> You need one to sort on and one to print
![Page 28: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/28.jpg)
28
Microsoft Access
> Some things you may not know about using Access• Segments with invoice data (e.g., commission)
![Page 29: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/29.jpg)
29
Segments with Invoice data - Microsoft Access
> Data from Invoice repeats on each segment row
> Which means, amount fields will be multiplied by the number of segments in totals and subtotals
![Page 30: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/30.jpg)
30
Segments with Invoice data - Microsoft Access
> Quick and dirty, get amounts on 1st segment only
Comm: Iif (SegmentNum = 1, CommAmount, 0)
Doesn’t work if there is no segment #1 (can happen on partial refunds)
> Apportion to all segments (divide by the number of segments)• Query the number of segments in each Payid
![Page 31: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/31.jpg)
31
Segments with Invoice data - Microsoft Access
> Apportion to all segments (divide by the number of segments)• Query the number of segments in each Payid
• Include that query in the main query and divide
Comm: CommAmount / NumSeg
![Page 32: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/32.jpg)
32
Microsoft Access
> Some things you may not know about using Access• Agent Name
![Page 33: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/33.jpg)
33
Agent Name - Microsoft Access
> If agents’ sine <> account Id (which sometimes has to be):
![Page 34: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/34.jpg)
34
EDIT user
> Original set of fields fairly limited
> Insert and Delete rights to Comments added in 3.40
> Insert, update, delete rights to HccRecData for a modest fee
> Other fields and tables possible for fee – let’s discuss – such as• TempCashRcpt
– Get Cash Receipts reads this, so this could provide a CR import
• Credit card data (some of you have this already)
• Account Id date open (bug has been fixed but historical could be wrong)
• Others? (can’t be true accounting; “in sync” fields, maybe)
![Page 35: GlobalWare via ODBC](https://reader033.vdocument.in/reader033/viewer/2022061614/568144a5550346895db16cdd/html5/thumbnails/35.jpg)
35
Access – What else?
> I know we didn’t cover all of these topics in PHX
> If you have questions, please feel free to email me – my email address is in the attendee list