Query to check security

  • Has a SP which loads a text file into SQL tables via a staging table which is done by the User from tha app by entering the file name.

    How can I check if that particular user has permissions to load that file given..

    1) Grab (area, pay) from the staging column which shud match columns(area,pay) in tb.File table, where FileId(PK).

    2) tb.File.Field(pk) = tb.Users.Field(FK). where tb.Users.LoginId(PK)

    NOTE: When a user enters file name to load we are also getting his loginID as a parameter.

     

  • This was removed by the editor as SPAM

  • Not sure what I'm missing here... As you said, load the file into the staging table and check the table for the necessary columns/permissions, etc.  If they're wrong, just empty the staging table and tell the user "sorry".

    It should take long, either... Bulk Insert will easily do 100,000 rows of a six column text file in almost the blink of any eye...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply