Skip to main content
Solved

importing data - unable to import date column

  • December 29, 2023
  • 6 replies
  • 129 views

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

I am trying to import data from an excel-file, using the universal gui. This works, but certain records contain an end_date. These records are rejected by the import-module.

I have been checking for constraints, data-type, triggers and handlers, but nothing seems to work. I have another date-column (start_date) and that works fine, so it looks some functionality is blocking the insert. So, my main question is: when importing data, what functionality is applied to the records:

  • triggers?
  • handlers?
  • constraints?
  • defaults?
  • lay / ctx ?
  • anything else?

I just want to know where to look for the problem.

Best answer by Hugo Nienhuis

We have a check that enforces this behaviour. To make a long story short, we (have) experience(d) a lot of difficulties when importing data into this tabel. There are both triggers and handlers on the table, as well as quite some lay/def code for enforcing several of these rules. This makes importing data quite vulnerable to mistakes.

 

I have been thinking to create a separate importing-table to easily import the data, and creating a task to test and correctly insert that data. That will give me more control of the import process. If anyone has another possible solution to this I would be thankful. If not, you can close this subject.

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img+16

Is there a difference in control type/date format (data type) between the ones that do and don't work?


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

No, they use the same domain. The only difference in the functionailty I can find is in the insert trigger, but the code itself does not seem  to be a problem (to me):

       set pc.end_date = dateadd(day, -1, i.start_date)

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Hugo,

If the end_date is set to be equal to one day before the start_date, that could be preventing the insert in some way. Is there a check that enforces end_date to be bigger that start_date?


Jeroen van den Belt
Administrator
Forum|alt.badge.img+8

Hi @Hugo Nienhuis,

Can you please respond to Mark his latest question? Thanks in advance!


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

We have a check that enforces this behaviour. To make a long story short, we (have) experience(d) a lot of difficulties when importing data into this tabel. There are both triggers and handlers on the table, as well as quite some lay/def code for enforcing several of these rules. This makes importing data quite vulnerable to mistakes.

 

I have been thinking to create a separate importing-table to easily import the data, and creating a task to test and correctly insert that data. That will give me more control of the import process. If anyone has another possible solution to this I would be thankful. If not, you can close this subject.


Jeroen van den Belt
Administrator
Forum|alt.badge.img+8

Allright Hugo, we can keep this topic open for a while to see if someone comes up with an alternative solution. If this is not the case I will make sure we'll close this topic after a while.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings