Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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!
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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; 
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The script errors out when I trying running the first part:

The same with the second part

The files are not too large:


 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		When you run individual files it runs fine right?
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be change your driver from oledb to odbc
System Requirements (Visual FoxPro ODBC Driver) | Microsoft Docs
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		See screenshot below when I bring up the table viewer:

 
					
				
		
 vishsaggi
		
			vishsaggi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 ccb-it2013
		
			ccb-it2013
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If I try using the ODBC driver, I get the error below:


