Search results

  1. L

    Append Query Fails: 'Key Violations'

    SOLVED: I fixed the problem by just deleting the table from my copy of the database, and scripting the original properly to regenerate (instead of just 'importing'). Equally, I think I could have achieved the same thing by changing 'IsIdentity' in the 'Identity Specification' of the table...
  2. L

    Append Query Fails: 'Key Violations'

    hi jdraw, thanks for writing. The records themselves don't exist, [I ran a query to check] but perhaps the primary keys that Access is assigning to the new records by default do exist? Probably 1,2,3,4,5,... I'm guessing. The primary keys in the target table look like an autonumbers in...
  3. L

    Append Query Fails: 'Key Violations'

    Hi guys An Access 2003 append query is failing due to 'key violations'. It is meant to append data from a linked csv file to a linked table in a SQL Server Database. The error message reads: "MS Access...didn't add 1329 records to the table due to key violations.." There are exactly 1329...
  4. L

    Can you do an Inner Join on the results of 2 queries?

    Hi Guus, Query 1 would return no results for strategies C D & E if there are no records in the DB which satisfy Query1's condition on the 'Time Sent' field. Specifically, Query 1 looks for TimeSent in the last 24 hours, for which a different calculation is required, hence the different query. It...
  5. L

    Can you do an Inner Join on the results of 2 queries?

    Hi Guus, Not sure because I'm no expert, but it seeems right to me. I will explain. Query 1 might return numerical results for Strategies: A, B and C. Query 2 might return results for Strategies: C, D and E. I need a final query that gives me the sum across queries 1 & 2 for ALL strategies...
  6. L

    Can you do an Inner Join on the results of 2 queries?

    Dank u wel Guus! That really put me in the right direction, so simple really but I didn't realise that was allowed with queries in the place of tables. By the way your example gives the inner join, whereas I in fact need a FULL OUTER JOIN. It turns out that a full outer join is not...
  7. L

    Can you do an Inner Join on the results of 2 queries?

    Hi, I have a form with many slow and cumbersome dLookup formulae in textboxes. I want to replace it with a neat and dynamic query subform. For this I need to add the numerical results of two queries in something analagous to an inner join. But inner joins only exist for tables, and you can't...
  8. L

    Question Multiple connections

    Re: Multiple connections **SOLVED** I think I might have answered my own question.. instead of above, using Set g_dbFAT = g_wrkTrades.OpenDatabase(sFilename, False) tells excel to open the DB in non-exclusive mode. However, the question about whether using a global variable for the...
  9. L

    Question Multiple connections

    Hi All I know the multiple users issue is extensively documented in this forum and elsewhere, but I've been unable to achieve what I need yet. Background: I have an Excel application. This reads/writes to an Access DB, using SQL strings in VBA, via DAO. Works fine. Requirement: I need to...
  10. L

    Hi

    Hi All I joined a few weeks ago, already had somereally helpful tips on here. My educational background is more maths & econometrics, but in the real world I now find myself needing databases and SQL more and more.. Am doing an internship where I am, rather alarmingly, in charge of various...
  11. L

    Inner Join SQL Query in VBA is TOO SLOW

    Thanks for all the useful input guys. Didn't make all that much difference in this case but will be useful to know all these tips in future when dealing with bigger DBs. Pat: yes absolutely, you're totally right and I agree. The reason I've done this in this case was it was a quick and easy...
  12. L

    Inner Join SQL Query in VBA is TOO SLOW

    Hi all. Intro: I'm a DB/Access novice, doing an internship at a firm with no real in-house IT expertise, so I'd be very grateful for any advice on optimising this query. Am I doing something wrong, or is is this the best possible performance? Background: I've made an Excel Application for...
Top Bottom