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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. TheLazyPig

    If an Excel file already exists in the folder...

    Hi! I'm trying to COPY TO aglib_aug24 TYPE XL5 file in a folder but the file name is already exists. Is there a way I can rename the file I'm about to save without changing the exitsing one. SET DELETED ON SET SAFETY OFF SET UDFPARMS TO REFERENCE CLOSE ALL CLEAR LOCAL...
  2. TheLazyPig

    LISTAGG code like

    Hi! I guess I have to create a separate program to use the function for future requests like this. Thank you for the responses! :)
  3. TheLazyPig

    LISTAGG code like

    Is there a LISTAGG code in foxpro9 or any similar process? Thank you for the response. :)
  4. TheLazyPig

    Merge Into with multiple execution

    Hi! I would like to know if I can use merge with multiple executions when matched. When matched, it should insert the matched record into a history table first and then update the main table. When not matched, it will insert into the main table. I just wanted to back up the matched record for...
  5. TheLazyPig

    Merge Into like in Oracle to Foxpro 9

    Hi! Is there a Merge Into in Foxpro 9 like what Oracle does? From my previous thread in my table, I already have duplicate records that I wanted to delete the old one and retain the latest as-of-date. So now instead of inserting all records at once, I wanted to check if the new record has...
  6. TheLazyPig

    Deleting duplicate records from cursor

    Thank you for the replies. I created a new table (region2) same column as the region, which I use to append the correct records from duplicates. Delete all duplicate records then PACK. After that, I append region2 to region. I used ZAP to region2 before append so I'll only insert the current...
  7. TheLazyPig

    Deleting duplicate records from cursor

    Okay, I understand. The program is working there's no error found. I checked the region table if duplicates were deleted correctly, I used the empno that has duplicate record but both of them is gone instead of removing only the previous date. Sample record from table region. The highlighted...
  8. TheLazyPig

    Deleting duplicate records from cursor

    Hi! I wanted to delete only the old records but I ended up deleting both. To get duplicate records I used having count(*) > 1 then Delete from region. SET DELETED ON SET SAFETY OFF LOCAL pcPopFile,pcCurrDir *---------------------------------- pcPopFile = "C:\BACKUP_FILES\NETPAY"...
  9. TheLazyPig

    "No table is open in the current work area" error when Replace

    Thank you so much for the replies. The program is working.
  10. TheLazyPig

    "No table is open in the current work area" error when Replace

    I get an error Is it because I already USE it before that's why it's open?
  11. TheLazyPig

    "No table is open in the current work area" error when Replace

    Hi! I get an error "No table is open in the current work area" in highlighted part. SET DELETED ON SET SAFETY OFF LOCAL pcCurrDir,pcScrPath,pcBckPath,pcRegion,pcAsOf,pcBkDate,pnCtr,lnRegCnt,lnDupCnt,lnDelCnt,lnDupCnt,lnTotCnt *---------------------------------- pcCurrDir =...
  12. TheLazyPig

    Upload file and use for extraction

    Ok Sir I'll remember that. I still want to add about saving the file. If it can choose what name to save like when you save as a file in excel. Or should I create another thread of this? hehe Thank you so much, sir/s! :D
  13. TheLazyPig

    Upload file and use for extraction

    Thank you for the replies. I removed everything except the SET DELETED ON, Close Database from the upload button and 'Extraction Cancelled'. And changed my textbox to read-only I did some changes to my code, I added a filter (ATC()) where if the file does not contain the word AGLIB will get...
  14. TheLazyPig

    Upload file and use for extraction

    Okay, I fixed it. But lcDir is only the filename.
  15. TheLazyPig

    Upload file and use for extraction

    Hi! I'm going to create a form that uploads a single .dbf file and use it as a table for extraction. Below is the form layout... textbox = disabled; views the file name uploaded Upload = should get the .dbf file in the local driver of the user Extract = after upload, extract the file using...
  16. TheLazyPig

    Separate 1 row value to multiple rows

    Ok I tried to use UNION SELECT pol.policyno AS polNo ,CASE WHEN (SELECT remarks FROM pa_card WHERE cntrlno = pol.policyno) LIKE '%UMA%' THEN 20000 ELSE pac.coverageamt END AS faceAmt ,CASE WHEN (SELECT remarks FROM pa_card WHERE cntrlno =...
  17. TheLazyPig

    Separate 1 row value to multiple rows

    Hi! If remarks is not null... I'll have to separate UMA, AMR, and BAB in rows like below... Thank you!
  18. TheLazyPig

    Inserting Text Decimal to Table Error

    Hi! I'm going to import a record into the database. RECORDS TABLE After I import I get this instead. RESULT The polno should be the same as records. How can I fix the inserted record? Thank you!
  19. TheLazyPig

    Separate name per column in Excel

    Hi! Thank you for all the replies. I really had a hard time on this, I already have a solution and it doesn't need to be separate anymore because the database has a full name column. Before I found out that it has a full name column, I tried to separate it by using text-to-column but it didn't...
  20. TheLazyPig

    Separate name from different columns

    Hi! Thank you for all the replies. I really had a hard time on this, it will only be used when the .dbf file was given to the user maybe monthly? I already have a solution and it doesn't need to be separate anymore because the database has a full name column. Before I found out that it has a...

Part and Inventory Search

Back
Top