Search results

  1. cheekybuddha

    Optimizing a query with multiple LIKE '%abc%'

    (y) OK, but network latency may be worse! Just make sure to test as much as possible - especially with multiple users.
  2. cheekybuddha

    Access Stability

    22 year necro - good work! :rolleyes:
  3. cheekybuddha

    Optimizing a query with multiple LIKE '%abc%'

    Is this with a local dev server (or same LAN)? Make sure you test over WAN if you are using Azure for a more realistic sense of how long it takes. (y)
  4. cheekybuddha

    Optimizing a query with multiple LIKE '%abc%'

    -- ... Totals AS ( SELECT ml.GENERATOR_ID, SUM(ISNULL(ml.QUANTITY_HAZ_KG, 0)) AS decTotalKg, -- ... Do you need the ISNULL() here or is it another extra unnecessary function call? I *think* SUM(ml.QUANTITY_HAZ_KG) AS decTotalKg should yield the same result.
  5. cheekybuddha

    Optimizing a query with multiple LIKE '%abc%'

    Possible micro-optimisation: What version of SQLServer are you using? If 2017 or later you can use TRIM() instead of LTRIM(RTRIM())
  6. cheekybuddha

    windows 11, cant see hidden files in folder

    If you go to Explorer options, and then View tab, you can uncheck 'Hide protected operating system files (Recommended)'. That might reveal your files.
  7. cheekybuddha

    Solved Multi-Select List Box, Distinct Values

    Pretty grim to have to split and loop on every item! If you have 100 items and no repeats then you're close to 1000 iterations :oops:
  8. cheekybuddha

    Solved How to run an append query to append Five lines same data in the same table

    Your description gives the feeling that you have a flaw in your tables design. If all products are available to all warehouses then you should have a single products table and a separate table for warehouses, and then a junction table for WarehouseProducts. Then, when you get a new product you...
  9. cheekybuddha

    Solved StringFormatSQL from Northwind

    You're welcome! (y) (I'm guessing that you took the above 'Returns' code from here and hand-edited it to resemble what is output by the function because you still have double quotes around (New) !)
  10. cheekybuddha

    Solved Multi-Select List Box, Distinct Values

    Just in case it isn't obvious from the code, the trick is to add the delimiter you use to separate your values in the string before and after the value you seek. That way you avoid matching on partials. However, you also have to avoid the gotcha where the string being searched does not have a...
  11. cheekybuddha

    Solved Multi-Select List Box, Distinct Values

    You could equally have removed the extra ( before .Column ! (Apologies, I didn't test 😁 ) Glad it works for you
  12. cheekybuddha

    Solved Multi-Select List Box, Distinct Values

    Try this variation Dim strSelected As String Dim varItem As Variant Dim delim As String delim = ", " With Me.lstLiveWorksOrderList For Each varItem In .ItemsSelected If InStr(delim & strSelected & delim, (.Column(2,varItem) & delim) = 0 Then...
  13. cheekybuddha

    Solved StringFormatSQL from Northwind

    UPDATE tblItems SET ITPath = '1 > 3', Item = '(New)', InUse = True WHERE flocID = 7 and DocNo = 1; The two statements above are exactly the same, except using the single quotes prevents with having to futz with your triple double quotes when building your SQL string, and is handled...
  14. cheekybuddha

    Solved StringFormatSQL from Northwind

    Why are you removing the quotes from {0} and '(New)'? ITPath and Item appear to be string datatypes, no? For {3} You need to build the SQL more explicitly (use {3} and {4}). strSql = StringFormatSQL("UPDATE tblItems" & _ " SET ITPath = {0}," & _...
  15. cheekybuddha

    How to register library/reference from vba code?

    Hi Albert, just a quick heads up, due to this site's propensity to attract spammers, you will need to have around 100 posts before you will be able to post links. (y) d
  16. cheekybuddha

    field variables in sql string

    This description, which I did not fully understand, is a bit of a 'code smell' that you have poor/sub-optimal table design. The answers here are really just band-aids to work around what should be extremely simple with better designed tables.
  17. cheekybuddha

    field variables in sql string

    If notes will be the same for every possible inserted record then you can try: oDB.Execute "INSERT INTO Discrepancies( Accession, Main_Family, Genus, Infra, Raw_Box, Collection, Notes) " & _ "SELECT B.Accession, B.Family, B.Genus, B.Infra, B.BoxNo, B.Collection, '" &...
  18. cheekybuddha

    field variables in sql string

    What is your question? Do you have an error? It looks like you need an extra space at the end of the above: "WHERE A.Main_Family ='" & sFamily & "' " & _ ^ | space here Also here...
  19. cheekybuddha

    Windows 10 End of Life

    No, it wasn't. Just cool your boots. It's OK to disagree without resorting to acting like you're in the playground.
Back
Top Bottom