Migrating companies based on a specific date range

ATTENTION: This forum is no longer active. Please navigate to our new support site at https://support.starfishetl.com/
Viewing 2 posts (of 2 total)
User - Author
Post count: 17


In my GM database, their is no date value for companies, everything is always related to a contact.

I would like for example to migrate only companies from 2011 (and also all contacts belonging to this company).

What I think is: I look after the first created contact in the company, retrieve the createon date from this contact that could likely be considered as the creation date of this company. From here, I have the creation date of the company. After that, for my first job 'Account + contact' I have to specify that I only want to migrate companies based on dates (year, date range).

How could I do this ?

I already tried this SQL query in the origin tab of my job but has expected, it only creates my the contacts from this date range.

  1. select * from contact1 c1 inner join contact2 c2 
  2. on c1.accountno=c2.accountno 
  3. where c1.lastdate>'2012-06-01 00:00:00.000' AND c1.lastdate<'2013-01-01 00:00:00.000'

Thank you

Comments (2)

Aron Hoekstra's picture Aron Hoekstra
Post count: 2

If I understand what you're asking then I think your query simply has the wrong dates in it and i think it has the wrong field you're filtering on.. didn't you say you want to use the createon date?

if you want everything from 2011 it'd be like:

  1. select * from contact1 c1 inner join contact2 c2 
  2. on c1.accountno=c2.accountno 
  3. where c1.createon>;='2011-01-01' AND c1.CREATEON<'2012-01-01'

Log in to post comments
Sebastien's picture Sebastien
User - Author
Post count: 17


Log in to post comments
Viewing 2 posts (of 2 total)

Forum Login

Login or sign up for our forums to connect to the user community.


You must log in to post.

Not a Member? Register.