Search results

  1. A

    SQL Order By With Calculations

    PERFECT! Thank you SO VERY MUCH for this enlightening information! Works pefectly!
  2. A

    SQL Order By With Calculations

    Im sorry, I do not quite understand what you mean by this. My sql comprehension is moderate at best, but growing. Would you care to eleborate a bit on using the second query? Thank you!
  3. A

    SQL Order By With Calculations

    Fantastic work - thanks guys! I have all my data queried perfectly! I am, however, unable to sort by [% Customers Saved] field. I have tried ORDER BY the alias as well as my ROUND calculation formula. Neither are working. Heres what I have that DOES work: SELECT (rep.lastname+'...
  4. A

    SQL Order By With Calculations

    Thank you for your response! It does indeed speed things up a bit. However, what I'm looking for is the ability to sort my specific columns of data. Here is my 'simulated' sql statement. Of course tho, it does not work, I am unsure as to how to get it to work. Any thoughts? SELECT...
  5. A

    SQL Order By With Calculations

    I am trying to import data from my database. My current SQL is as follows: SELECT DISTINCT (rep.lastname+', '+rep.firstname) AS Rep, (SELECT COUNT(*) FROM LiveData WHERE WorkingRep = tli.WorkingRep) AS Worked, (SELECT COUNT(*) FROM LiveData WHERE SuccessType = 'PTP' AND WorkingRep =...
  6. A

    Access SQL TOP n ORDER BY issue

    I have a a table with primary key being [Account Number]. I am trying to order all my accounts by their priority and then return the next account to be worked (the top account). i use the sql like: SELECT TOP 1 [Account Number] FROM LiveData WHERE WorkingRep Is Null ORDER BY Priority ASC...
  7. A

    Allow Opening of one single record at a time.

    Here is my vba code: strSQL = "SELECT TOP 1 [Account Number] FROM LiveData WHERE WorkingRep Is Null And Priority In (1);" Set rst1 = New ADODB.Recordset With rst1 Debug.Print .State .Open strSQL, CurrentProject.Connection, adOpenForwardOnly, adLockOptimistic Debug.Print .State...
Back
Top Bottom