This file contains 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
CREATE INDEX IDX_ClienteEmail | |
ON Cliente(Email) | |
INCLUDE (Nome, Sobrenome) | |
WITH (DROP_EXISTING = ON) |
This file contains 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
CREATE INDEX IDX_ClienteEmail | |
ON Cliente(Email) |
This file contains 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 Id, | |
Nome, | |
Sobrenome, | |
FROM Cliente | |
WHERE Email = 'vinicius.mussak@outlook.com' |
This file contains 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
UPDATE Cliente | |
SET Nome = 'Vinicius', | |
Sobrenome = 'Mussak', | |
Email = 'vinicius.mussak@outlook.com' | |
WHERE Id = 333123 |
This file contains 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 COUNT(*) AS QuantidadeRegistros FROM Cliente | |
SELECT TOP 10 * FROM Cliente |
This file contains 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 @Contador INT = 1000000 | |
WHILE @Contador > 0 | |
BEGIN | |
INSERT INTO Cliente(Nome, Sobrenome, Email) | |
VALUES ( | |
SUBSTRING(REPLACE(CONVERT(VARCHAR(250),NEWID()), '-', ''),1,15), | |
SUBSTRING(REPLACE(CONVERT(VARCHAR(250),NEWID()), '-', ''),1,15), | |
LOWER(SUBSTRING(REPLACE(CONVERT(VARCHAR(250),NEWID()), '-', ''),1,30)) + '@email.com' | |
) |
This file contains 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
CREATE TABLE Cliente ( | |
Id INT IDENTITY(1,1) NOT NULL, | |
Nome VARCHAR(50) NOT NULL, | |
Sobrenome VARCHAR(50) NOT NULL, | |
Email VARCHAR(200) NOT NULL, | |
CONSTRAINT Cliente_PK PRIMARY KEY (Id) | |
) |
This file contains 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
string caminho = @"C:\Users\Vinicius Mussak\Desktop\ReplaceDocxExample\ReplaceDocxExample\"; | |
static void Replace() | |
{ | |
using(var documento = DocX.Load(caminho + "documento.docx")) | |
{ | |
documento.ReplaceText("#nome", "Vinicius Mussak"); | |
string mes = DateTime.Now.ToString("MMMM", CultureInfo.CreateSpecificCulture("pt-br")); | |
documento.ReplaceText("#mes", mes); |
This file contains 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
using System; | |
using System.Globalization; | |
static void Main(string[] args) | |
{ | |
var mes = ExibirMesPorExtenso(new DateTime(2019, 7, 7)); | |
Console.WriteLine(mes); //julho | |
Console.ReadKey(); | |
} |
This file contains 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 listaDeErros2 = new List<string> | |
{ | |
"Erro 01", | |
"Erro 02" | |
}; | |
listaDeErros2.Insert(0, "Os erros foram:"); |