SQL SERVER | Calcolare il peso di una tabella
Questo script visualizza l’elenco delle tabelle di un database visualizzando il relativo peso in megabyte: DECLARE @t TABLE ( Name...
Blog
Sviluppo software, cloud, backend e tutto ciò che trovo interessante.
Questo script visualizza l’elenco delle tabelle di un database visualizzando il relativo peso in megabyte: DECLARE @t TABLE ( Name...
EXEC sp\_HelpText ‘nome\_stored\_procedure’
Questo comando crea un file grande 50 megabyte: fsutil file createnew test.txt 52428800
Il seguente codice permette di aggiungere, in una tabella, un nuovo campo solo se questi non esiste già: IF NOT EXISTS( SELECT \* FROM...
Da String a MemoryStream Dim \_string As String = “Stringa da convertire” Dim \_bytes As Byte() =...
For \_i As Integer = 0 To \_dataSet.Tables(0).Rows.Count – 1 For \_j As Integer = 0 To \_dataSet.Tables(0).Columns.Count – 1...
SELECT o.Name AS ‘StoredProcedure’ FROM SysObjects AS o INNER JOIN SysComments AS c ON o.ID = c.ID WHERE c.\[Text\] LIKE ‘%testo da...
In appSettings del web.config aggiungere la seguente voce:
SELECT ID,CASE WHEN ID % 2 = 0 THEN ‘Pari’ ELSE ‘Dispari’ END AS ‘Verifica’ FROM Tabella (Utilizzare % 4 al posto di % 2 se si vuole...
Problema: Inserendo nel web.config la voce si verifica l’errore This configuration section cannot be used at this path. This happens...
L’esempio seguente mostra come poter estrarre da un testo il contenuto di una stringa delimitata mediante in marcatori “\[” e “\]” Dim Regex...
Avviare Power Shell da SQL Server Management studio e lanciare il seguente script: $db = (new-Object...