User Profile

Collapse

Profile Sidebar

Collapse
blechner
blechner
Last Activity: Aug 22 '07, 04:47 PM
Joined: Aug 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • blechner
    started a topic SQL View of MS Access

    SQL View of MS Access

    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?
    See more | Go to post

  • blechner
    started a topic with (nolock) equivalent

    with (nolock) equivalent

    Is there a with (nolock) equivalent when writing queries in Access 2003?
    See more | Go to post

  • blechner
    replied to Sql Trigger Problem
    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.
    See more | Go to post

    Leave a comment:


  • blechner
    replied to Sql Trigger Problem
    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....
    See more | Go to post

    Leave a comment:


  • blechner
    replied to Sql Trigger Problem
    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...
    See more | Go to post

    Leave a comment:


  • blechner
    started a topic Sql Trigger Problem

    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...
    See more | Go to post
No activity results to display
Show More
Working...