...save without changing the exitsing one.
SET DELETED ON
SET SAFETY OFF
SET UDFPARMS TO REFERENCE
CLOSE ALL
CLEAR
LOCAL lcTest,lcFile,lcRes,lcDir
*----------------------------------
lcTest = "C:\BACKUP_FILES\"
lcDir = "O:\Programs\OR\"
lcFile = thisform.txtFileName.Value
caDir =...
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...
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...
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...
...of removing only the previous date.
Sample record from table region. The highlighted row should be deleted.
Below is my code for deletion.
**To Delete Duplicate Records
PROCEDURE deleteDuplicate
CLOSE ALL
USE (pcScrPath) IN 0 SHARED ALIAS Region
SELECT * ;
FROM region ...
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"...
...SET DELETED ON
SET SAFETY OFF
LOCAL pcCurrDir,pcScrPath,pcBckPath,pcRegion,pcAsOf,pcBkDate,pnCtr,lnRegCnt,lnDupCnt,lnDelCnt,lnDupCnt,lnTotCnt
*----------------------------------
pcCurrDir = "C:\BACKUP_FILES\Region"
pcScrPath = pcCurrDir+"\230308\region.dbf"
pcBckPath =...
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
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...
...lcDir = gcFile
lcFile = "'C:\BACKUP_FILES\AGLIB_EXTRACT\'"
USE lcDir IN 0 SHARED NOUPDATE
SET DELETED ON
SELECT * FROM AGLIB WHERE rec_status <> 'D'
IF MESSAGEBOX("Extract Agent Library?",36,"Confirmation") = 6
COPY TO lcFile+"aglib_extract" TYPE XL5
MESSAGEBOX("File...
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 =...
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!
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...
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...
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.