Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2005, 02:25 AM
muhibcan muhibcan is offline
Junior Member
 
Join Date: Mar 2005
Posts: 10
Default Adding values with SQL

i want to add the content of one field (mathematically)..
then want to write the result into another field...
by using adoquery...
thats my question..
thanx.
Reply With Quote
  #2  
Old 03-24-2005, 02:31 AM
autocorect autocorect is offline
Senior Member
 
Join Date: Mar 2005
Posts: 725
Default RE: Adding values with SQL

add where ? in table ?

TTable.append (insert or edit) ;
TTable.Fields[0].AsFloat:=ADOQuerry.fields[0].AsFloat
TTable.post;

can use bachmove if structure is identical.
Reply With Quote
  #3  
Old 03-24-2005, 03:57 AM
muhibcan muhibcan is offline
Junior Member
 
Join Date: Mar 2005
Posts: 10
Default RE: Adding values with SQL

iwant to add the whole values (sum them) in one field...
then use final summation...
like.. i have the field.. that is called numbers, and also include numbers , and i want to sum all numbers ,into one variable...
using adoquery or any other thing, that is my problem....
thanx.
Reply With Quote
  #4  
Old 03-24-2005, 04:18 AM
autocorect autocorect is offline
Senior Member
 
Join Date: Mar 2005
Posts: 725
Default RE: Adding values with SQL

so you have a field with value and you whant to sum all record or group of record ?

***
this is SQl instruction, put this in sql and run, result is 1 total of all record

SELECT SUM(FIELD) AS TOTAL
FROM "PATH\TABLENAME.EXTENSION"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:38 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.