473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Tabellenwert in einer anderen Tabellenspallte eintragen

Hallo,
Folgende Situation:

In [Tab1] gibt es eine Spalte [Nr] mit aufsteigenden Zahlenwerten.
In [Tab2] möchte ich nun alle Elemente der Spalte [Lauf Nr] mit dem
Max von [Tab1]![Nr] überschreiben (aktualisieren).

Dazu habe ich eine Aktualisierungsabfrage hergenommen welche beide
Tabellen [Tab1] und [Tab2] beinhaltet. Als Aktualisierungswert schrieb
ich "Max([Tab1]![Nr])"

Leider bleibt die Abfrage bisher aber ohne Erfolg.

Wer kann mir sagen, wie ich trotzdem zum Ziel kommen kann?

There's [Tab1]![Nr] filled with numbers
There's [Tab2]![Lauf Nr] I'd like to fill (update) with Max of [Tab1]!
[Nr]
How to proceed (using a Update-Querry)?

Thanx dudes

Mar 13 '07 #1
2 2321
On 13 Mar 2007 01:51:37 -0700, "tone" <an***************@pantec.com>
wrote:

There should not be a need to store this data in a table, as it can
easily be calculated in a query. Storing calculated values is a
violation of good database design principles.
The query would be:
select Max(Nr) from Tab1
Use this query anywhere you were going to use Tab2.

-Tom.

>Hallo,
Folgende Situation:

In [Tab1] gibt es eine Spalte [Nr] mit aufsteigenden Zahlenwerten.
In [Tab2] möchte ich nun alle Elemente der Spalte [Lauf Nr] mit dem
Max von [Tab1]![Nr] überschreiben (aktualisieren).

Dazu habe ich eine Aktualisierungsabfrage hergenommen welche beide
Tabellen [Tab1] und [Tab2] beinhaltet. Als Aktualisierungswert schrieb
ich "Max([Tab1]![Nr])"

Leider bleibt die Abfrage bisher aber ohne Erfolg.

Wer kann mir sagen, wie ich trotzdem zum Ziel kommen kann?

There's [Tab1]![Nr] filled with numbers
There's [Tab2]![Lauf Nr] I'd like to fill (update) with Max of [Tab1]!
[Nr]
How to proceed (using a Update-Querry)?

Thanx dudes
Mar 13 '07 #2
Hi Tone,

I am agree with Tom, it's better using query to obtain the calculation
from Tab1 other than save the calculation to Tab2, however if you
still want to keep the value for other reason, you may use this

UPDATE Table2 SET Table2.MaxNo = DMax("[No]","Table1")
WHERE (((Table2.[No])=1));

HTH
Yanto
tone wrote:
Hallo,
Folgende Situation:

In [Tab1] gibt es eine Spalte [Nr] mit aufsteigenden Zahlenwerten.
In [Tab2] möchte ich nun alle Elemente der Spalte [Lauf Nr] mit dem
Max von [Tab1]![Nr] überschreiben (aktualisieren).

Dazu habe ich eine Aktualisierungsabfrage hergenommen welche beide
Tabellen [Tab1] und [Tab2] beinhaltet. Als Aktualisierungswert schrieb
ich "Max([Tab1]![Nr])"

Leider bleibt die Abfrage bisher aber ohne Erfolg.

Wer kann mir sagen, wie ich trotzdem zum Ziel kommen kann?

There's [Tab1]![Nr] filled with numbers
There's [Tab2]![Lauf Nr] I'd like to fill (update) with Max of [Tab1]!
[Nr]
How to proceed (using a Update-Querry)?

Thanx dudes
Mar 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: amir | last post by:
Hallo Ihr Experten, ich möchte aus einem Formular aus, eine bereits vorhandene Laufendenummer aus einer Tabelle.spalte auslese und dazu noch eine 1 addiere und dann das Ergebnis in ein Textfeld...
1
by: David Fedier | last post by:
hallo bei einer dll die ich am schreiben bin benutze ich bei einer funktion ein struct als rückgabewert. und wenn ich diese dll in einem anderen projekt einbinden will bekomme ich keinen...
1
by: Daniel Walzenbach | last post by:
Hallo, ich bereite mich gerade auf die Prüfung 070-305 vor (langfristig MCSD) und suche noch Leute, die gerne mitlernen möchten. Ist einfach lustiger wenn mehrere Personen zusammenkommen....
0
by: Johannes Eble | last post by:
Hallo allerseits, ich habe eine Webform, die u.a. zwei User Controls enthaelt, sagen wir usrA.ascx und usrB.ascx. usrB.ascx enthaelt wiederrum ein User Control usrBB.ascx. usrA.ascx enthaelt...
3
by: Maximilian Hofer | last post by:
Hallo NG, wie kann man ein Bild in einer Datenbank speichern d.H. Ich habe in meinen Progrmm eine PictureBox einem mit einem Image, und ich m;chte diese Daten in einer DB speichern. Wie...
8
by: Maximilian Hofer | last post by:
Hallo NG, zum erstellen einer Anfrag an eine Website benutze ich folgenden Code: Dim encoding = New System.Text.UTF8Encoding 'Daten zum Posten zusammenbauen Dim postData As String
2
by: Thiemo Ripper | last post by:
Hallo Ng, folgendes Stückchen Programm: try stmFile = System.IO.File.Open(txt_Convert.Text, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read) objCRC = New DesktopDll.FileOp.CRC32...
1
by: adrian_w | last post by:
Hallo NG Ich zechne einen Kreis auf eine Form, welcher seine Position alle 10ms ändert. Dies mache ich mit einem Timer. Nun fährt der Kreis jedoch nicht schön, sondern es flackert die ganze...
1
by: G.Weinerth | last post by:
Hallo zusammen, ich suche ein Ereignis, das ausgelöst wird, wenn eine Access-Datenbank inaktiv wird. (Access 2003) Hintergrund ist: Anwender macht ACCESS-Datenbank auf und arbeitet damit,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.