Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Recent content by NTrade

  1. NTrade

    sql to create value dependent on prior record

    Is Access/Jet Table is this: id, wo, 1, 2345-1 2, 2345-1 3, 2345-1 4, 5432-1 5, 5432-1 6, 5432-1 Need result: id, wo, parent 1, 2345-1, 1 2, 2345-1, 1 3, 2345-1, 2 4, 5432-1, 4 5, 5432-1, 4 6, 5432-1, 5 the logic is If wo = wo of ID-1 then Parent = Id-1 If wo not= wo of...
  2. NTrade

    simple math sql - need help

    Am humble...need help w/ basic sql since I don't write it often enough Sequence Rev SumPast4 1 100 n/a 2 110 n/a 3 105 n/a 4 103 418 5 55 373 6 90 353 etc etc Table has first 2...
  3. NTrade

    date sort two column

    Have an sql puzzle that is so classical it could be text book. Column1 is Date Column2 is Amended Date There is always an entry in Column1 - there is occasionally an entry in Column2. My query needs to return the records in chronological order - and the Amended Date is to be used when it...
  4. NTrade

    eliminate duplicate records

    Found a relatively easy solution via 2 step; SELECT Table1.Email, Max(Table1.[Order ID]) AS [MaxOfOrder ID] FROM Table1 GROUP BY Table1.Email; This gave me what I need because the nondups are by definition the max OrderID value of their group of 1... The second step was just to join the full...
  5. NTrade

    eliminate duplicate records

    am thinking about this: SELECT * FROM Table1 As X WHERE X.Email = Table1.Email AND X.OrderID > Table1.OrderID but it will return only comparable records: 5 Joey S x-xxx 123@test.com 6 Jimbo zzz ttt@you.com it leaves out: 3 Fred yyy 456@this.com because the...
  6. NTrade

    eliminate duplicate records

    thnks both - but am still struggling....would welcome more input....
  7. NTrade

    eliminate duplicate records

    I enjoy sql - but sometimes can't get my head around the puzzle; Have Table1 due to sloppy data entry have duplicates in the Table1: OrderID Name Address Email 1 Joe xxxx 123@test.com 2 Joe S. x xxx 123@test.com 3 Fred yyy 456@this.com 4 Jim zzz...

Part and Inventory Search