Last active
December 21, 2022 21:45
-
-
Save atodev/0302947fe57dff4436a196602e12af72 to your computer and use it in GitHub Desktop.
[MSSQL]
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
USE ONA | |
GO | |
IF OBJECT_ID('LLC_SQL','u') IS NOT NULL | |
DROP TABLE LLC_SQL; | |
CREATE TABLE LLC_SQL ( | |
Sender nvarchar(MAX) NULL, | |
Recipient nvarchar(MAX) NULL, | |
RecipientType nvarchar(MAX) NULL, | |
Direction nvarchar(MAX) NULL, | |
Media nvarchar(MAX) NULL, | |
DateTime int, | |
MessageID nvarchar(MAX) NULL, | |
Info nvarchar(MAX) NULL, | |
); | |
print 'table created' | |
BULK INSERT LLC_SQL | |
FROM 'D:\Dev\Sites\Etisalat\enron-1640984820.llc' | |
WITH ( | |
FIRSTROW=2, | |
FIELDTERMINATOR='\t', | |
DATAFILETYPE = 'char', | |
KEEPNULLS | |
); | |
SELECT * | |
FROM LLC_SQL |
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
https://solutioncenter.apexsql.com/how-to-mask-sql-server-data-using-dynamic-data-masking/ | |
When the Email method of masking is in question, ALTER TABLE…ALTER COLUMN T-SQL statement will look like this: | |
ALTER TABLE dbo.Customer | |
ALTER COLUMN Email NVARCHAR(50) MASKED WITH (FUNCTION = 'email()') | |
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
https://www.withdata.com/mssql-cmd/unload.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment