I am trying to obtain the longest full name with a zip+4
SELECT TOP 1 * FROM waynedb ORDER BY FULLNAME WHERE LEN(RTRIM(FULLNAME)) = (SELECT MAX(LEN(RTRIM(FULLNAME))) FROM waynedb WHERE LEN(RTRIM(FULLNAME)) > 0 AND LEN(RTRIM(ZIP4)) > 9)
I am receiving records without zip+4
I have the following SQL statement. What I am trying to do is find the longest length address that has a zip+4. I know there may be many address that have the same length. My problem is I am getting addresses that do not have a zip+4. Any help would be greatly appreciated:
SELECT TOP 1...
Yes, I did that before submitting my question, I am attach the length, but did not get any records, than I tried on another database and it worked. I submitted question because I thought my zip code length wasn't working. And Dave I am only selecting Top 1 for maximum length. Thanks guys
Hi,
Current I am using the following statement to get the longest full name:
SELECT TOP 1 CITY FROM MYDB ORDER BY SQNCNMBR,
WHERE LEN(CITY) = (SELECT MAX(LEN(CITY)) FROM MYDB,
WHERE LEN(CITY)) > 0)
What I am trying also to add is a check for zipcode > 5
Please advice
Thank you so much Olaf,
Originally I stated this project in VBA, was converting in over to FoxPro because of some issues with fix length files, which I think I can do in FoxPro, again, Thank you, and thanks to everyone else for your assistance.
Hi Olaf,
The error code is OLE error 0x80020003: member not found. I have check the workbook properties, under data connections connection string is :Provider=VFPOLEDB.1;Data Source="C:\USERS\WAYNE.PERKINS\DOCUMENTS\VISUAL FOXPRO PROJECTS\QA"; sql is SELECT COUNT(*) FROM ("29484Q1.DBF"), and...
Hello Olaf,
I have tried your suggestion, I am still receiving an error QryTable.Refresh = .T.
oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls")
oSheet = oWorkbook.Sheets(1)
oSheet.Activate
sDatabase = GETFILE("DBF","","",0,"Select [Q] File Database To Process")
sConnString =...
Thank you so much Vilhelm, I just tried your suggestion
oExcel.Visible = .T.
oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls")
It worked, now just on more question
sSqlstring = "SELECT COUNT(*) FROM " + sDatabase
oQryTable = oSheet.QueryTables.Add("OLEDB;Provider=VFPOLEDB.1;Data Source=" +...
First, I want to deal with one issue at time, yes, I have read the Workbooks.Open Method, and yes, I have read Excel - How to do Automation from VFP, have done automation before
oExcel = Createobject("Excel.Application")
With oExcel
.Workbooks.Open("C:\Users\WDP\Documents\Visual FoxPro...
Sorry, I meant oQryTable.Refresh = .T. is when I get error from on the QueryTable, and yes I have tried other folders, like I said, I am able to add a workbook, but not open an existing work, as for the refresh, how am I to get my data displayed if I can refresh
I am having 2 minor problems, first, I can't open an excel workbook:
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls")
I have even tried
oWorkbook = oExcel.Application.Workbooks.Open("C:\WDPQA.xls")
The funny thing is I will comment out the oWorkbook...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.