The field IsActive matches the parameter Delete Procedure: Supplied, and is supplied, the procedure selects all rows where When is not supplied, is not supplied, the procedure selects all rows. If = 1 the Select Procedure will have anĪdditional parameter called (bit). Your View (Table) to have a bit-type field named 'IsActive'. If variable is set to 1 (True), then the Select Procedure expects If ID (Primary Key) is supplied it will select a single row from the View This is my preference but you can modify to suit. This generator always uses the Parameter name to represent the Primary The part of this procedure that performs this function to suit your needs. That's because in my databases I use those field names for audit, and theyĪre never modified except internally within the database. This generator is hard-coded to avoid inserting If ID (Primary Key) is supplied it will perform an Update. If you want to perform selects directlyįrom the table, simply use the table name in both Upsert Procedure: This generator expects to perform inserts, updates, and deletes on a PRINT N' SET CONTEXT_INFO + CHAR(13) + CHAR(10) Need to remove the PRINT statement for each procedure that looks like: That adds it as a parameter to each of the 3 procedures. Have no use for it, you'll need to remove the piece of generator code The Context, so that my audit procedures get the validated user. My job easier, and I am sharing it with you to do with it as you wish.Īll 3 procedures have a parameter called which is used to set It does not have a bunch ofīells and whistles, and is easy to follow and modify. This is a simple, single-table CRUD Generator. Es generiert TSQL für eine Upsert-, Select- und Delete-Prozedur mit der von Ihnen angegebenen Tabelle und Ansicht. Es ist einfach, kann aber leicht an Ihre Bedürfnisse angepasst werden. Ich habe ein einfaches TSQL-Skript, das ich für meine Arbeit verwende. Wenn Sie Visual Studio verwenden, können Sie es tun:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |