This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# `./shim_make.sh install` within macOS, then `/Users/{macOS-user}/shim_root/shim_make.sh` within multipass | |
SHIM_ROOT="shim_root" | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
if [ "$1" = "install" ] ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |AddressTypeID|AddressType| |AddressTypeID|AddressType| | |
|OURS <<<|NULL |NULL |THEIRS >>>|2 |Term | | |
|OURS <<<|NULL |NULL |THEIRS >>>|3 |Work | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE PROCEDURE [dbo].[DataCompare] | |
@table_name sysname, | |
@remote_db_name sysname, | |
@import_theirs_to_ours bit = null, | |
@import_ours_to_theirs bit = null, | |
@schema_name sysname = 'dbo' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO dbo.AddressTypes ( | |
[AddressTypeID], | |
[AddressType] | |
) | |
SELECT | |
[theirs].[AddressTypeID], | |
[theirs].[AddressType] | |
FROM dbo.AddressTypes [ours] | |
FULL OUTER JOIN RemoteServer.CustomerDatabase.dbo.AddressTypes [theirs] | |
ON [ours].[AddressTypeID] = [theirs].[AddressTypeID] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @SQL = 'INSERT INTO ' + @local_table_name + ' (' + @CRLF | |
SELECT @SQL = @SQL + @TAB + '[' + #columns.name + '],' + @CRLF | |
FROM #columns | |
SELECT @SQL = SUBSTRING(@SQL, 1, LEN(@SQL) - LEN(@CRLF) - 1) + @CRLF | |
SELECT @SQL = @SQL + ')' + @CRLF | |
SELECT @SQL = @SQL + 'SELECT' + @CRLF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'OURS <<<' AS [ ], | |
[ours].[AddressTypeID], | |
[ours].[AddressType], | |
'THEIRS >>>' AS [ ], | |
[theirs].[AddressTypeID], | |
[theirs].[AddressType] | |
FROM dbo.AddressTypes [ours] | |
FULL OUTER JOIN RemoteServer.CustomerDatabase.dbo.AddressTypes [theirs] | |
ON [ours].[AddressTypeID] = [theirs].[AddressTypeID] | |
WHERE [ours].[AddressTypeID] IS NULL AND [theirs].[AddressTypeID] IS NOT NULL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @SQL NVARCHAR(MAX) | |
DECLARE @i INT | |
SET @SQL = 'SELECT ' | |
SET @SQL = @SQL + '''OURS <<<'' AS [ ],' + @CRLF | |
SELECT @SQL = @SQL + @TAB + ' [ours].[' + #columns.name + '],' + @CRLF | |
FROM #columns | |
SET @SQL = @SQL + @TAB + ' ''THEIRS >>>'' AS [ ],' + @CRLF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT c.column_id, c.name | |
FROM sys.objects o | |
INNER JOIN sys.schemas s | |
ON o.schema_id = s.schema_id | |
AND s.name = @schema_name | |
INNER JOIN sys.indexes i | |
ON o.object_id = i.object_id | |
AND i.is_primary_key = 1 | |
INNER JOIN sys.index_columns ic | |
ON i.object_id = ic.object_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT c.column_id, c.name | |
FROM sys.objects o | |
INNER JOIN sys.schemas s | |
ON o.schema_id = s.schema_id | |
AND s.name = @schema_name | |
INNER JOIN sys.columns c | |
ON o.object_id = c.object_id | |
WHERE o.name = @table_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var films = new MightyOrm(connectionString, "Film"); | |
var page = films.Paged(orderBy: "Title", currentPage: 2, pageSize: 30); |
NewerOlder