tsunami

log in
history
points to
Duplicate ~ Duplicate Duplicate
add add

Duplicate

Luke Breuer
2008-12-26 04:55 UTC

Introduction & Presumptions

As far as the learning aspect goes, I've taken a few weeks of set theory which has taught me a bit about sets and languages, but nothing about regular expressions, though the textbook does provide a reference I may consult for that later. whut

This is H1

-- 1. alter table
alter table Revenue_Code add 
    input_date  smalldatetime not null default getdate(),
    input_user  varchar(30)   not null default user_name(),
    update_date smalldatetime     null,
    update_user varchar(30)       null

-- 2. create/alter trigger
--   if no trigger exists, create one
--   some sample triggers can be found by executing this:
--     select top 20 * from sys.sql_modules where definition like '%update_user = user_name()%'
create trigger Revenue_Code_UPDATE on Revenue_Code for update
as
    update  r set
            update_date = getdate(),
            update_user = user_name()
    from    Revenue_Code r  
    inner join inserted i on i.revenue_code_pk = r.revenue_code_pk
go


-- 3. add Field_Info metadata for the new columns added
-- 4. right click on the Table_Info record in ESAdmin and check off 
--    "Contains: input_date/user, update_date/user"
-- 5. add Query_Template_Field records, and perhaps a new Query_Template_Category
--    called "Auditing" or "Other" or something like that
  • what
a mess
  • this is


$InvokeSqlcommand = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Invoke-Sqlcommand.ps1'
$InvokeSqlscript = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Invoke-Sqlscript.ps1'
$TestExtract = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Test-Extract.ps1'
$ProcessPatientData = $source_code_repository + '' + $sql_import_daily_directory + '' + 'ProcessPatientData.ps1'
$ProcessNonPatientData = $source_code_repository + '' + $sql_import_daily_directory + '' + 'ProcessNonPatientData.ps1'


vs.


$InvokeSqlcommand      = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Invoke-Sqlcommand.ps1'
$InvokeSqlscript       = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Invoke-Sqlscript.ps1'
$TestExtract           = $source_code_repository + '' + $sql_import_daily_directory + '' + 'Test-Extract.ps1'
$ProcessPatientData    = $source_code_repository + '' + $sql_import_daily_directory + '' + 'ProcessPatientData.ps1'
$ProcessNonPatientData = $source_code_repository + '' + $sql_import_daily_directory + '' + 'ProcessNonPatientData.ps1'