Importing Data using ODBC connection
Forums
Hi,
I have the Mastering IDEAScript manual (by John Paul Mueller) and I can't seem to find any examples of importing data using an ODBC connection to Oracle within a macro. It is quite simple using the import assistant but my users have no SQL knowledge. Essentially what I would like to achieve is to create a dialog box which allows the user to enter an ID number and a fiscal year. Using those values as parameters I would like to import the data into IDEA.
SQL Example:
Select * from table(eg. transcation_detail) where id = :IDNumberEnteredByUser and fiscal_year = :FiscalYearEnteredByUser;
Is this possible and if so how would I do it? Do you need more information?
I am currently using Client Version 8.0.5.243
Thanks for your help.
Kenny
Hi all.
Hi all.
I have managed to amend the Oracle ODBC script to meet my needs, however, I am now seeking to improve it and remove the need to make manual amendments. As can be seen in the attachment, I have had to include a payment date in the SQL parameters for the import.
Is it possible to add variables that are not included on the dialogue box? I would like to pull from eg the user entering 19/20, a "FROM" date of '01-APR-2019' and a TO date of '31-MAR-2020' which can be used in the SQL.
Currently, if a user was to enter 17/18 in the Financial Year, I would expect it would bring back no results, due to my fixed SQL parameters.
I did have a thought that I could include a file or database with a list of dates, financial years and start and end dates to look up to, however, that may be overcomplicating things at this stage!
Hi,
Hi,
I have a question in case that I don´t want to fill in the endless list of field in the import. Can I instead add a function removing those unwanted fields like:
Remove Field
Function RemoveField
Set db = Client.OpenDatabase("###.IMD")
Set task = db.TableManagement
task.RemoveField "IGCDAT_TIME"
task.PerformTask
Set task = Nothing
Set db = Nothing
End Function
thanks Mr. brian
thanks Mr. brian
now i will need ur help when actually i have to iimport data
ur guidance that time will help a lot