From: Fredrik on
Hi,


I have one table which is made from a tablequery.
From this table I want to add everything to an existing table.

The From table:
Loadingdate Unloadingdate Pallets Trucknumber
DATE DATE Number Text
| | | |
| | | |
The To table: | | |
Loadingdate Unloadingdate Pallets Trucknumber Yadayada Date
Date Number Text Text

I have 19 posts in the "temp" From table and when I run the query it finds
"0" records to add.
Off course there is something that i must do wrong, but I have no clue about
what.
Any ideas?

Thanks!
From: Jerry Whittle on
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Fredrik" wrote:

> Hi,
>
>
> I have one table which is made from a tablequery.
> From this table I want to add everything to an existing table.
>
> The From table:
> Loadingdate Unloadingdate Pallets Trucknumber
> DATE DATE Number Text
> | | | |
> | | | |
> The To table: | | |
> Loadingdate Unloadingdate Pallets Trucknumber Yadayada Date
> Date Number Text Text
>
> I have 19 posts in the "temp" From table and when I run the query it finds
> "0" records to add.
> Off course there is something that i must do wrong, but I have no clue about
> what.
> Any ideas?
>
> Thanks!
From: KARL DEWEY on
Do you have any criteria in the append query?
Does your To table have a primary key field?
Does your To table have an index set to unique?

I see what appears to be a problem in that your Unloadingdate is a date in
the From and number in the To table. Also the Pallets are number in the From
and text in the To.

Post your SQL of the append query. Open in design view, click on menu VIEW
- SQL View, highlight all, copy, and paste in a post.

--
KARL DEWEY
Build a little - Test a little


"Fredrik" wrote:

> Hi,
>
>
> I have one table which is made from a tablequery.
> From this table I want to add everything to an existing table.
>
> The From table:
> Loadingdate Unloadingdate Pallets Trucknumber
> DATE DATE Number Text
> | | | |
> | | | |
> The To table: | | |
> Loadingdate Unloadingdate Pallets Trucknumber Yadayada Date
> Date Number Text Text
>
> I have 19 posts in the "temp" From table and when I run the query it finds
> "0" records to add.
> Off course there is something that i must do wrong, but I have no clue about
> what.
> Any ideas?
>
> Thanks!
From: Fredrik on
Here it comes:

INSERT INTO [Bilpriser N&K] ( Lastningsdatum, Lossningsdatum, [EUR-Pall],
[BIG-Pall], Bilnummer )
SELECT tempbilnr.Lastningsdatum, tempbilnr.Lossningsdatum,
tempbilnr.SummaförEUR, tempbilnr.SummaförBIG, tempbilnr.Bilnummer
FROM tempbilnr INNER JOIN [Bilpriser N&K] ON ([Bilpriser N&K].Bilnummer =
tempbilnr.Bilnummer) AND (tempbilnr.Lastningsdatum = [Bilpriser
N&K].Lastningsdatum)
GROUP BY tempbilnr.Lastningsdatum, tempbilnr.Lossningsdatum,
tempbilnr.SummaförEUR, tempbilnr.SummaförBIG, tempbilnr.Bilnummer;

"Jerry Whittle" skrev:

> Show us the SQL. Open the query in design view. Next go to View, SQL View
> and copy and past it here.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "Fredrik" wrote:
>
> > Hi,
> >
> >
> > I have one table which is made from a tablequery.
> > From this table I want to add everything to an existing table.
> >
> > The From table:
> > Loadingdate Unloadingdate Pallets Trucknumber
> > DATE DATE Number Text
> > | | | |
> > | | | |
> > The To table: | | |
> > Loadingdate Unloadingdate Pallets Trucknumber Yadayada Date
> > Date Number Text Text
> >
> > I have 19 posts in the "temp" From table and when I run the query it finds
> > "0" records to add.
> > Off course there is something that i must do wrong, but I have no clue about
> > what.
> > Any ideas?
> >
> > Thanks!
From: Fredrik on
Hello again,

No the formats are correct (date-date, text-text), only this messagesystem
screwing my text =).

I have no criteria what so ever. The To table has Trucknumber and
Loadingdate as prim. key. No no index is set to unique.

I'm going nuts over this. I mean this is one of the simplest things to do,
still it does not work.. :/.

"KARL DEWEY" skrev:

> Do you have any criteria in the append query?
> Does your To table have a primary key field?
> Does your To table have an index set to unique?
>
> I see what appears to be a problem in that your Unloadingdate is a date in
> the From and number in the To table. Also the Pallets are number in the From
> and text in the To.
>
> Post your SQL of the append query. Open in design view, click on menu VIEW
> - SQL View, highlight all, copy, and paste in a post.
>
> --
> KARL DEWEY
> Build a little - Test a little
>
>
> "Fredrik" wrote:
>
> > Hi,
> >
> >
> > I have one table which is made from a tablequery.
> > From this table I want to add everything to an existing table.
> >
> > The From table:
> > Loadingdate Unloadingdate Pallets Trucknumber
> > DATE DATE Number Text
> > | | | |
> > | | | |
> > The To table: | | |
> > Loadingdate Unloadingdate Pallets Trucknumber Yadayada Date
> > Date Number Text Text
> >
> > I have 19 posts in the "temp" From table and when I run the query it finds
> > "0" records to add.
> > Off course there is something that i must do wrong, but I have no clue about
> > what.
> > Any ideas?
> >
> > Thanks!