Search results

  1. C

    Need help adding grouping to an existing query

    Still not workin'... Also, any idea why everytime I open it, it changes the brackets in the very first FROM clause and the end of the sub-query from "(" and ")" to "[" and "].", but it wont let me save it like that? I have to change them back to the "(" and ")", but if I save and close, then go...
  2. C

    Need help adding grouping to an existing query

    I do have three tables: DWP_F_DEALER_VEHICLE_INVENTORY DWP_D_VEHICLE_TYPE_APX DWP_D_DEALER DWP_F_DEALER_VEHICLE_INVENTORY is joined to the other two tables by different fields. ... at least, that's what I'm trying to do! I'll try that and let you know
  3. C

    Need help adding grouping to an existing query

    Here is my SQL in a word document... layed out a bit nicer, and easier to read.
  4. C

    Need help adding grouping to an existing query

    I am still getting a syntax error in the from clause...
  5. C

    Need help adding grouping to an existing query

    That's what I thought, but I was wondering if you could nest it in there like with an IIf statement or something...
  6. C

    Need help adding grouping to an existing query

    That's what I was wondering... in the code it reads: FROM DWP_F_DEALER_VEHICLE_INVENTORY INNER JOIN DWP_D_VEHICLE_TYPE_APX ON DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID INNER JOIN...
  7. C

    Need help adding grouping to an existing query

    No luck... Should the WHERE clause that refers to the first INNER JOIN come before the second INNER JOIN?
  8. C

    Need help adding grouping to an existing query

    No unfortunately it isn't... I'm getting a different error message... It says: Syntax error (missing operator) in query expression 'DWP_F_DEALER_VEHICLE_INVENTORY.VEHICLE_TYPE_SID = DWP_D_VEHICLE_TYPE_APX.VEHICLE_TYPE_SID INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID =...
  9. C

    Need help adding grouping to an existing query

    version 2: SELECT * INTO PNV_BY_ZONE FROM [ SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' & Mid([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],5,2) AS TRANSACTION_DATE, DEALER_SID...
  10. C

    Need help adding grouping to an existing query

    So those commas are probably causing the syntax error? thanks Sorry about my poor formatting skills... I thought I had made it "semi-readable" :o
  11. C

    Need help adding grouping to an existing query

    I tried rewriting the SQL, but I am still getting the "syntax error" in the FROM clause... here is the SQL SELECT * INTO [PNV_BY_ZONE] FROM (SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY]![PROCESS_DATE_SID],4) & ' ' &...
  12. C

    format time to [hh]:mm in a query

    try taking the double quotation out... so... Format([YourField], "hh:nn")
  13. C

    Need help adding grouping to an existing query

    I don't get it either... It took it this time, and let me save it... but now if I try to run the query, it says there is a Sytax error in the FROM clause... :confused:
  14. C

    Need help adding grouping to an existing query

    hmm... when I try to save the SQL, I get this error message: Invalid bracketing of name ' SELECT 'RETAIL' AS TYPE, Count(*) AS SALES, Left([DWP_F_DEALER_VEHICLE_INVENTORY'. any ideas?
  15. C

    Need help adding grouping to an existing query

    Mailman, Thank you for not handing me the answer on a silver platter. I come this website for help with issues, not a hand out... Plus this is the only way I will both learn AND retain information! I really appreciate your help! So, here is what I have come up with based on the hints you left...
  16. C

    Need help adding grouping to an existing query

    Ok... no help so far... Can anyone suggest where I would put this grouping? Each sale records the dealer code, which in the table I mentioned in post #2 is associated to one of 7 Zones. Would I add "UNION ALL" and then the SELECT statement to the end of the SQL? Do I start the SQL off with the...
  17. C

    Set report control visible=false based on value in detailed records (for each record)

    Thanks for your help guys, I appreciate it. I ended up using your method, Pat, as I also had 4 other labels that needed to go .visible = false if the first one goes .visible = true Cheers!
  18. C

    Need help adding grouping to an existing query

    The other table that has the dealer & zone information I want to include in this query would work like this: table: DWP_D_DEALER field: DEALER_SID join: DWP_D_DEALER INNER JOIN DWP_F_DEALER_VEHICLE_INVENTORY ON DWP_D_DEALER.DEALER_SID = DWP_F_DEALER_VEHICLE_INVENTORY.DEALER_SID
  19. C

    Need help adding grouping to an existing query

    Hi guys! Happy new year to everyone! I have a couple of existing queries that come together to produce sales information. Right now, it is done only at the national level but we are looking to calculate it by zone (atlantic, prairie, quebec, etc.). I have another table that is not currently...
  20. C

    Set report control visible=false based on value in detailed records (for each record)

    I think I pretty much described my issue in the title... I have a report, and in the details section, if a field is = 0, I would like to set a label's visible property to true, and if the field's value is <>0, set the label's visible property to false. As always, any help is appreciated. Happy...
Back
Top Bottom