Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
For the life of me I can't join 2 dbf files so that I can get the necessary data I need from the second database.
In my script I have this:
SELECT * FROM ADO CONMANPO_H
The name of the second dbf I need to get data from is called say CONMANPO_D . They field they have in common is called PONO.
I tried this:
LEFT JOIN CONMANPO_H on PONO as CONMANPO_D
However I get a script error when I try running the script.
What am I doing wrong?? I am sure it is something really simple.
Thanks for your help!
How much data are you trying to pull? Can you do this abort the script and then just run two SELECT statements separately. Like remove Left Join() and just run.
ADOCONMANPO_H:
LOAD *;
SELECT
adoh.Ticket,
adoh.Style,
adoh.Vendor,
adoh.Mfcode,
adoh.duedate
FROM ADOCONMANPO_h adoh;
ADOPLINS:
LOAD *;
SELECT
adoplins.Account,
adoplins.Color,
adoplins.desc,
adoplins.linetot
adoplins.shipno,
adoplins.PONO AS Ticket
FROM ADOPOLINS adoplins;
The script errors out when I trying running the first part:
The same with the second part
The files are not too large:
When you run individual files it runs fine right?
May be change your driver from oledb to odbc
System Requirements (Visual FoxPro ODBC Driver) | Microsoft Docs
If I run:
SELECT * FROM ADOCONMANPO_H
This is ok.
If I run :
SELECT * FROM ADOPOLINS
This is ok as well.
If I try running the scripts you suggested individually, it errors out.
Hmmm. Strange. Can you do this, can you see both the tables in your table viewer?
Press Ctrl+T and check what you see in Tableviewer an paste that snapshot here please
My ERP software developper uses the oledb driver when I commission them to write a report for me. My superiors wish that I learn to write the reports myself.
If they are able to use the OLEDB driver, I should be able too. They don't want to share the information.
See screenshot below when I bring up the table viewer:
Can you do one thing. Can you run like below
ODBC Connect.....
Table1:
SELECT * FROM ADOCONMANPO_H;
ODBC Connect.....
Table2:
SELECT * FROM ADOPOLINS;
Then check your tableviewer.
If I try using the ODBC driver, I get the error below: