Is it possible to create a View in MSSQL that will pull data from an MS Access database?
I know you can go the opposite direction, link to a SQL View through Access, but can you go the other way with it?
User Profile
Collapse
-
SQL View of MS Access
-
with (nolock) equivalent
Is there a with (nolock) equivalent when writing queries in Access 2003? -
I found a workable solution.
After inserting all existing records into the table I changed the LW_NUMBER column to an identity column.
This allows future values in the LW_NUMBER column to be automatically assigned using the previous maximum value as the new starting value.
There could be gaps in the sequence if an insert fails, but for our purposes this is a non-issue. -
Gave it a try but got the following error:
Error 1032: Cannot usethe column prefix "INSERTED". This must match the object in the update clause....Leave a comment:
-
The trigger I most recently tried is as follows:
CREATE TRIGGER [LW_NO] ON dbo.AP_LIEN
AFTER INSERT
AS
DECLARE @LW INT
SELECT @LW =MAX(LW_NUMBER)
FROM AP_LIEN
UPDATE AP_LIEN
SET LW_NUMBER = @LW + 1
The only problem is that this trigger updates the lw_number on all records, not just the one most recently inserted.
I don't think the create_table...Leave a comment:
-
Sql Trigger Problem
I'm trying to write a trigger for a database that will capture the previous value of a field and, on insert of data from the app, increment that field by 1.
This field is similar to a check number, and the first record in the database will not be 1, it will be something like 386651. I'd like to be able to grab that as my initial starting number and increment each record thereafter by 1.
I do have a record identifier...
No activity results to display
Show More
Leave a comment: