borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (how to maintain unique ID's in a database)Next Topic (Enquiry - ADO) New Topic New Poll Post Reply
AndreaVB Forum : Database : Trouble writing a query
Poster Message
Dan01
Level: Guest


icon Trouble writing a query

Knowing my luck it is more than likely that this is impossible.

I am trying to write a query that will take X amount of data from 1 table in database1.mdb and add it to addtion in the same table in database2mdb

So for example I have 20000 clients in a table in database2.mdb and 30000 in database1.mdb
I want to right a query that grabs the 30000 and adds them.

(Copy and paste doesn't work, not enough memory)

I have linked the table in from database1.mdb into database2.mdb

So all I need to do now is rwright a query.

Can someone show me a screenshot or a tutorial for this?
I'd prefer a screenshot of how the query should look as it will help me

Thank you

Dan

18-06-2003 at 04:37 PM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Trouble writing a query

my first tip...

you'd need the simple code to transfer the entries from one table to another, then you'd do a loop..

my second tip...

depending on how you intend to do the job... you can't transfer such an amount immediately...

you'll have to give pauses, then refresh memory, then do another loop..

can't give code right now...

i'm experiencing a life altering crisis, and i'm just trying to keep my mind off it for now...



____________________________
Been busy trying to take a second degree <--it's not working out...

18-06-2003 at 05:39 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Trouble writing a query

If vbgen is a little distracted right now, I'll butt in.

Are you able to do an append query?

Go into the query designer in access select the table you want to copy from.

Then select the fields you want to copy. Don't select * select the fields individually.

Then make the query an append query (its in the drop down menus)

Select the table you want to copy to.

If the field names match then they will automatically be displayed in the query designer, if they are not you can manually set them anyway.

Then run the query!

I cannot include a screen shot as I don't know how to.

Any problems let me know.

Cheers Steve

[Edited by steve_w on 19-06-2003 at 07:57 AM GMT]

18-06-2003 at 10:00 PM
View Profile Send Email to User Show All Posts | Quote Reply
Dan01
Level: Guest

icon Re: Trouble writing a query

I will try

But to take a screenshot you push the "Print Scrn" button on the keyboard.
It is located above the Insert, Home, Page Up keys etc.

Push the "Print Scrn" button and paste into a picture editor, or even microsoft word. Save the picture/doc and email it to me at:
dan.blowers@4front-finance.co.uk

I would prefer a screenshot so i can compare what the query should look like.

Thank you

Dan

19-06-2003 at 08:13 AM
| Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Trouble writing a query

Hi Dan

Just sent you the e-mail.

btw I knew how to do the screen copy , i just didn't know how to put it into the forum . Also you can do an ALT-PRTSCR that will only copy the selected window.

Cheers Steve

19-06-2003 at 08:27 AM
View Profile Send Email to User Show All Posts | Quote Reply
Dan01
Level: Guest

icon Re: Trouble writing a query

hehe. I didn't know ALT Print Scrn worked

It worked anyway.

Thank you very much

19-06-2003 at 09:12 AM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Trouble writing a query

...thanks, steve...

m'life's kinda messy... and since i love this forum a lot...

it seems to be some sort of refuge for me... tho i still have my probs to face...

it's like a little break from the ugly stuff.  

____________________________
Been busy trying to take a second degree <--it's not working out...

19-06-2003 at 04:00 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Trouble writing a query

Noooo problem

    

19-06-2003 at 04:02 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Trouble writing a query
Previous Topic (how to maintain unique ID's in a database)Next Topic (Enquiry - ADO) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder