Update whole table fast

  1. Right Click --> Edit top 200 Rows

  2. Select the sides and delete

  3. Copy new data from Excel or other source

  4. Select the Side with * and insert

  5. Check if data is correct with SELECT * FROM <table_name>

To execute procedures use:

exec <PROCEDURE_NAME> 'PARAM1' 'PARAM2';

Note:

If you have multiple excel entries that need to be updated by the same procedure you can use the following excel formula to update each row individually

  • Adjust cells in excel from the formula with the corresponding ones

="exec `PROCEDURE NAME` `'"&E2&"' , '"&C2&"',  '"&A2&"'";`

To select database table with timestamps use:

Begin
    declare @now datetime2 = sysdatetime();
    print 'Exported all data from TABLENAME table at system time=' + convert(char(20), @now, 121)
    select * from TABLENAME
End

Last updated