infor.com
concierge
infor u
developer portal
Home
Groups
Pegasus - Partner Community
Comparing excel and sales account in sname and then marking for deletion
unknown
Hi,
Does anyone know of the commands in VFP9 that will look at an account name in an excel spreadsheet (say column A), then look at sname.sn_account and if the two match, mark the record in sname for deletion?
Thanks in advance,
Bhav
Find more posts tagged with
Pegasus - Partner General Discussions
Comments
alan-bourke
You would need to get the Excel data into DBF format, and in Excel 2010/2013 you can't save as DBF from Excel any more. You could save it as CSV from Excel and then use the Import Wizard in VFP to get it into a DBF (say called 'mydbf'). Make sure the DBF structure has the account code as C(8).
Then in general you can use:
delete from sname where sn_account in (select accountcode from mydbf)
However you should really perform the same checks as Opera performs before it allows you to delete a sales account via the UI. Does the account have transactions? What about the analysis? What about SOP? Is it referenced in any other location? And so on.
colin-avey
Ditto Alan regarding performing checks.
I have been using the Save As "Microsoft Excel 5.0/95 workbook" option in Office 2013 since the demise of the DBF option. Then APPEND from account.xls type XL5
unknown
Awesome, thanks Alan and Colin.
:-)
unknown
Just to give you some alternative solutions you could also read the Excel spreadsheet using OLE Automation or write a program in Excel VBA to delete the record in SNAME. Obviously both subject to proper checks as per Alan's post.
0911060553270289.pdf
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
General Discussions
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions