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 (Listung Files of folder)Next Topic (Related To Error Handling) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Query
Poster Message
violet
Level: Scholar

Registered: 08-07-2005
Posts: 38

icon Query

Hi All

do help me how to do this process..

2 tables say table1 and table2..

table1[master table] contain fileds Date1 and Amt. the table2 has date1 and Amt....


what i want to do is i wanna set[update] flag in table 1 and table2 when amt of table1 is equal to sum of amt of table2...


i hav around 100 records in table1 and around 900 records in table2...

i want to update flag in table 1 and table2 flag

Table1.Amt = sum(Table2.Amt) there is no common fields between 2 tables...

Advance Thnx

violet

01-09-2006 at 11:10 AM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Query

Hello. I guess Amt means 'amount' (don't make us guess, be clear.)

1) When do you need to act? When table1.Amt changes? When table2.Amt changes? Every ten milliseconds? On next christmas? Every five years?

2) What has to be "equal to sum of amt of table2..."? The table1 current record's table1.Fields("Amt").Value, or last records's Amt field, or create a new record with sum(table2.Amt) in its Amt field, or the sum of all records' table1.Amt field - say, sum(table1.Amt) = sum(table2.Amt)? Or what?

3) And what 'flag' is? What do you mean by "set[update] flag"? Do you mean the UPDATE SET instruction of SQL? (...Did you know that 'UPDATE' and 'SET' are SQL keywords?...)

And more, are you using ADO (I hope so to you)? On what db engine: MSJet, SQLServer, MySQL, Oracle, DBase, ...or what? It'd be nice to know these things too.

So finally, again, don't make us guess: be clear! I don't think you'll pay an extra price if you type some more to explain us.

Waiting patienty around here, yours.

PS. in the while, have a trip here, or into any of the avaliable translated versions.

____________________________
Real Programmer can count up to 1024 on his fingers

02-09-2006 at 05:47 PM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Query

Nice link yronium   Perhaps this should be a permanent link at the start of the forum, or perhaps the author would allow us to reproduce it.


[Edited by GeoffS on 03-09-2006 at 01:14 PM GMT]

____________________________
multi-tasking - the ability to hang more than one app. at the same time.

03-09-2006 at 01:12 PM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Query

quote:
GeoffS wrote:
...Perhaps this should be a permanent link at the start of the forum...


You're not the first one who tell me this.


____________________________
Real Programmer can count up to 1024 on his fingers
04-09-2006 at 03:27 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Query
Previous Topic (Listung Files of folder)Next Topic (Related To Error Handling) 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