General discussion

Locked

Acces Tables

By mochagal ·
I have different Forms (data sources) with different fields. Basically we run contests on our website and use the have email addresses of people that visit our website. Some of those forms have address, state zip etc fields but these are not required - so we have a lot of nulls.
Question: what code (SQL) do I write to automatically append or download data into one main table - that would look for duplicate e-mail and fill in the blank fields on that row. - The e-mail address is my primary key.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Acces Tables

by donq In reply to Acces Tables

I must assume you have a firewall, and everything you are collecting is on the internet side of the firewall???

I would construct an Access Table named "Downloads" where every field Data Type exactly matches the imported target tables data type and have your Active Server Page (another assumption) dump directly into it (including any imported Null values.

Then I would construct a procedure in my company database (on the business side of my firewall) to import data from Downloads and convert Null values to a ("") zero length string, or (0) zero number on the fly duing an import. The procedure could then be called manually or automated to download whenever the incoming server Downloads Table reaches a recordcount of "n".

In Access build your query in query view - test in to convert Nulls etc. and then switch to SQL view and copy your code. Much faster than figuring everything out from memory!

Collapse -

Acces Tables

by mochagal In reply to Acces Tables

Poster rated this answer

Collapse -

Acces Tables

by roc180 In reply to Acces Tables

Use the following SQL from wherever you are updating your main table.

INSERT INTO Main_Tbl(e_Mail,State_tx,zip_id)
SELECT DISTINCT
'" & cur_User_Email & "', M.State_tx, M.Zip_id
FROM Main_Tbl M
WHERE M.e_Mail='" & cur_User_Email & "'

Ifyou have any questions drop me a line.

Good Luck

Neal Martinelli

Collapse -

Acces Tables

by mochagal In reply to Acces Tables

Poster rated this answer

Collapse -

Acces Tables

by mochagal In reply to Acces Tables

This question was closed by the author

Collapse -

Acces Tables

by mochagal In reply to Acces Tables

Both Answers worked for me. It only gave me the option to accept one.
I think both answers were usefull, the first one gave me all the procedures I needed, the second one gave me the SQL statement I needed to get job accomplished.

Back to Software Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums