Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help converting Access SQL to Progress.

Status
Not open for further replies.

rasadmin

MIS
Sep 24, 2001
8
0
0
GB
I'm trying to extract records from a table where Last Accessed is more than 90 Days ago.......

The following SQL works OK in access, but I'm having trouble writing the same logic against a Progress DB.

SELECT [Last Used].[User ID]
FROM [Last Used]
WHERE ((([Last Used].[Last Accessed])<=Date()-90))
ORDER BY [Last Used].[Last Accessed];

Last Accessed is a date fld and User ID is Character.

Any help appreciated.

 
Are you using ODBC to access the database or are you trying to use 4gl. If you are using ODBC what driver is it and what version of progress. There have been some changes in this area and the SQL code is different. One thing you will find with the SQL 92 dirver is that the SQL looks kind of odd. Like this:

SELECT OrderDtl_0.OrderNum, OrderHed_0.PONum, OrderDtl_0.PartNum, OrderDtl_0.OrderQty, OrderDtl_0.Company, OrderDtl_0.CustNum, OrderHed_0.OrderDate, Customer_0.Address1, CustCnt_0.EMailAddress, CustCnt_0.PhoneNum, CustCnt_0.Name, Customer_0.CheckBox01, CustCnt_0.ConNum
FROM PUB.CustCnt CustCnt_0, PUB.Customer Customer_0

All the tables had aliases. None of the table have _0 after them in the database. I used MS query builder because after trying standard SQL statements by hand they didn't work. If you are using an older Merant Driver or Open Link driver I can't help you there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top