Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: vinhtang
  • Order by date
  1. vinhtang

    sum of rate for each account ?

    Thank you so much for your help. It was very stupid of me. I used the wrong table. I should use last year table for rate cuz we do not have any data yet for current year. I apologize for wasting so much of your time.
  2. vinhtang

    sum of rate for each account ?

    There's no space. It must be something wrong with my SQL statement.
  3. vinhtang

    sum of rate for each account ?

    Thanks for your advice. I've tried this code when i export the data but I get NULL value for totalRate. Could you please take a look to see what I did wrong ? Please! SELECT dbo.parcel_tax.strap, SUM(dbo.lu_tax_dist.curr) AS TotalRate FROM dbo.parcel_tax LEFT OUTER JOIN...
  4. vinhtang

    sum of rate for each account ?

    Hi all, What I need is to get the total rate for each account and write it to a new table with that distinct account# (strap) & its total rate. table: parcel_tax strap tax_dist 12345 001 12345 002 12345 003 12345 004 01111 001 01111 007 01111 003...
  5. vinhtang

    do calculation base on 2 fields from 2 different tables

    Sorry! please forget about my previous email. The error was actually from INNER JOIN down. This is what I have: Table1: lu_mill_cd Table2: lu_tax_dist.curr I manually added field 'total_rate' to 'lu_mill_cd' table ***my code*** UPDATE lu_mill_cd SET lu_mill_cd.total_rate = lu_tax_dist.curr...
  6. vinhtang

    do calculation base on 2 fields from 2 different tables

    Hi I have a syntax error return on line GROUP BY Table2.Code) Table1 and I notice it has 1 single ")" I tried a couple things there but none works since I do not fully understand the codes yet. Sorry for taking too much of your time.
  7. vinhtang

    do calculation base on 2 fields from 2 different tables

    Oh I forgot to attach the table struture. Length Allow Nulls Data Type Column Name 5 char mill_cd 1 (check) varchar vac_flg 2 (check) char city_flg 1 (check) varchar spcl_dist 9...
  8. vinhtang

    do calculation base on 2 fields from 2 different tables

    Stupid me! :-) Is it ok that I add a column "rate" to the table2 first and then use your update statement ?
  9. vinhtang

    do calculation base on 2 fields from 2 different tables

    Million thanks. All my servers are down so I haven't able to test the codes yet. I'll let you know the result as soon as I know. I notice 1 thing though. Since my table 2 does not have field "rate" yet, I still have to include this line right ? DECLARE @Table2 TABLE (Rate Numeric(10,4))...
  10. vinhtang

    do calculation base on 2 fields from 2 different tables

    Thanks a lot for your quick response. I forgot to tell you that both my tables have thousands of record. In that case I guess I can not use what you suggested. I have to use some kind of loop to loop through and match the records right ? I'm completely unfamiliar with SQL statements, so...
  11. vinhtang

    do calculation base on 2 fields from 2 different tables

    Hi, What I have to do is to calculate the total rate for each code (in table 2) and insert that total rate field in that same table (2). I've never written any SQL codes except for simple select statements. Any help is greatly appreciated. Table1: CD Rate 001 1.5 002 1.25 003 0.5...

Part and Inventory Search

Back
Top