VM
My friend, we have seen this post before. Unfortunately it would seem that you haven't picked u
on the key (no pun intended) requirement for a table to have a primary key to be updateable
Here's the plan if you are still struggling
put a PK on ast_entity_i
make seperate queries for the record selection and updat
create a subroutine which is called by whichever event you need it to be called b
make that subroutine use the appropriate querie
Are you noticing something here? Structured programming (in an Event-driven fashion) may no
be the prettiest thing since sliced bread, but it is certainly more elegant than the Spaghetti
paradigm you are proposing. Imagine incorporating greater functionality, fixing errors or whateve
else needs to be done if you implement this code inline with the rest of the Event-driver and Form
driver code.
Way too much work than there needs to be, instead use subs and get with the program (ok, pun
intended)
Chop
----- VM wrote: ----
In my case, it's more about having one query that does everything. In ou
application, the user has a query that creates a temporary table *and
another query that updates based on that table. So, if I want to d
anything, I have to open all three queries (there's another query that doe
something else..)
I'd like to be able to create only one query that creates the table/view an
updates the table. But everything would be in the same query (not 2 or
queries for one process)
Would it be possible to create a temp-table with the data (maybe at th
beginning of the query) and then do the update of the table? It'd b
something like this (Everything in 1 query)
SELECT ast_entity_id, ast_id, date_ast_placed_in_service into [TempTableX
from dbo_ast_boo
Update Asset
INNER JOIN TempTableX ON Assets.AssetNo = TempTableX.ast_i
SET Assets.in_svc_date = TempTableX.date_ast_placed_in_servic
WHERE TempTableX.ast_id = "26203"
If something like this is posible, would I be able to create the temp tabl
so it only exists when running this instance of the query? As soon as it'
done, the table's disposed
And thanks again for all the help
V