jul 26 Microsoft Microsoft CRM scripts T-SQL tables update

T-SQL Make SLECT statement only on fields with data in

If you need to make a data dump of a table but don’t want to have all the empty fields, they just run this script and it will create the needed select statement that you can copy paste into a new query. DECLARE @TAB_NAME NVARCHAR(MAX) SET @TAB_NAME = ‘SystemUser’ DECLARE @RET_QUERY NVARCHAR(MAX) SET @RET_QUERY =…

Read more

jul 25 Microsoft CRM scripts T-SQL tables update

T-SQL Update fields from another table / database

Use the script below if you need to update data between 2 SQL databases or inside the same database, it’s plain and simple when you get the grib on it: Copy the text bewteen Start code and End code into you SQL Management Studio START CODE: update DESTINATION_DATABASENAME.dbo.AccountExtensionBase –Write the database / table you want…

Read more