kevinloydw wrote:Ein Fehler ist aufgetreten
Ursache: java.lang.NullPointerException
I've got the same problem, therefore importet the recipients by hand. Here's how:
We use the german titles:
- Herr = for male recipients
- Frau = for female recipients.
- Familie = "Family" used for unknown gender
Since I do not have the gender as a digit in my CSV file I made an extra field in the database called tmp_title.
At first, have a look for the highest customer_id in the recipients table
Code: Select all
select max(customer_id) from customer_1_tbl;
write it down, we need it later on
I then transformed my CSV file into insert statements. A text editor supporting macros is very helpful
A file like
Code: Select all
E-Mail;Cust.No.;Title;Degree;FirstName;LastName
foobar1@domain.com;10474134;Herr; ;Jim;Beam
foobar2@domain.com;10474135;Herr; :Jack;Daniels
foobar3@domain.com;10474136;Herr; :Johnny;Walker
[...]
should then look like
Code: Select all
insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar1@domain.com', '10474134', 'Herr', '', 'Jim', 'Beam', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar2@domain.com', '10474135', 'Herr', '', 'Jack', 'Daniels', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar3@domain.com', '10474136', 'Frau', '', 'Johnny', 'Walker', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
[...]
We can execute the inserts now
Now we tell OpenEMM about the recipient's gender
Code: Select all
update customer_1_tbl set gender='0' where tmp_title='Herr';
update customer_1_tbl set gender='1' where tmp_title='Frau';
update customer_1_tbl set gender='2' where tmp_title='Familie';
You could drop the field tmp_title now
Have a look for the mailinglist_id of the list where the new reciepients will be linked to
In my case it's 2
Link the recipients to the list. Mind the digit "2" in the subselect
Code: Select all
insert into customer_1_binding_tbl
(customer_id, mailinglist_id, user_type, user_status, user_remark, creation_date, exit_mailing_id, mediatype)
select customer_id, 2, 'W', 1, 'Import per SQL', '2006-11-28 11:10:00', 0, 0
from customer_1_tbl where customer_id > MAXIMUM_CUSTOMER_ID_FROM_ABOVE;
At last, update the sequence
Code: Select all
insert into customer_1_tbl_seq
(customer_id)
select customer_id
from customer_1_tbl where customer_id > MAXIMUM_CUSTOMER_ID_FROM_ABOVE;
That's it.