Archivio Posts |
Anno 2015
Anno 2014
Anno 2013
Anno 2012
Anno 2011
Anno 2010
Anno 2009
Anno 2008
Anno 2007
|
|
SQL Server arrotondare a 2 decimali
SQL Server Arrotondare a 2 decimali
ROUND
--> ROUND(prezzo, 2)
oppure
--> FLOOR(prezzo * 100) / 100
CASTCAST riposta in formato decimal
--> CAST ([Campo VAlore] AS Decimal(9,2)) Leggi tutto il post...
 martedì, 30 mar 2010 Ore. 14.20
Operatore BETWEEN per confronto date
Supponiamo di voler cercare tutte le date del mese di Febbraio 2003 per la tabella T_PROVA, il risultato atteso è di 28 righe. Per sviluppare la query è consigliato l'operatore BETWEEN:
ES:Use PubsGo--Impostazione del formato di input atteso da SQL Server: italianoSET DATEFORMAT dmy SELECT * FROM T_PROVA WHERE DATA BETWEEN '01/02/2003' AND '01/03/2003'SELECT @@ROWCOUNTGo
--Impostazione del formato di input: us_englishSET DATEFORMAT mdy   Leggi tutto il post...
 martedì, 30 mar 2010 Ore. 12.11
SQL Datafile Shrinking e Truncate Log
Shrinking & Truncate Log
Example:
SHRINKFILE DATAFILEDBCC SHRINKFILE(db_name_dat,1)DBCC SHRINKFILE(db_name_log,1)
TRUNCATE LOG
Backup log db_name with TRUNCATE_ONLY Leggi tutto il post...
 venerdì, 26 mar 2010 Ore. 13.54
Writing an automation for Dynamics NAV C#
Original link
http://techblog.byllemos.com/2008/10/writing-an-automation-for-navision-in-c/
REGISTER
You can not registrate the automation directly through VS2008. Here you have to use regasm and gacutil. Regasm is a part of your framework, where as gacutil is a part of Microsoft SDK.
UNREGISTER
Ex. on a dos script for registring the automation:
set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exeset gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\g Leggi tutto il post...
 giovedì, 25 mar 2010 Ore. 16.26
Disable Parameter Sniffing in SQL
Disable Parameter Sniffing in SQL, disable "cursor preparation"
Actually you can already disable the cursor preparation in NAV by adding a value to the "diagnostics" in "$ndo$dbproperty":
update [dbo].[$ndo$dbproperty] set [diagnostics] = [diagnostics] + 1048576
..requires NAV 5.0 SP1 Update 1 or higher. Leggi tutto il post...
 mercoledì, 24 mar 2010 Ore. 15.13
Restore database da network backup (restore from disk)
COMANDO
dopo lunghi test e link visitati ecco il comando funzionante riassemblato; Paremetri: backup name, Logical Name, File Name
RESTORE DATABASE "DBNAME" FROM DISK= N'\\192.168.0.1\Backup\sql\Backupdb.bak' WITH FILE= 1, MOVE N'DB_Data' TO N'H:\DB_Data.mdf', MOVE N'DB_1_Data' TO N'H:\DB_data_1.ndf',
MOVE N'DB_Log' TO N'H:\DB_Log.ldf', & Leggi tutto il post...
 mercoledì, 24 mar 2010 Ore. 11.27
Verificare versione Navision installata
Tabella dbproperty contieni informazioni sulla versione installata.
la tabella è la dbproperty e il campo databaseversionno.
.Per la SP1 va valorizzato a 40
.Per la SP3 va valorizzato a 60
Leggi tutto il post...
 mercoledì, 24 mar 2010 Ore. 11.18
|
Statistiche |
- Views Home Page: 477.215
- Views Posts: 895.331
- Views Gallerie: 0
- n° Posts: 343
- n° Commenti: 0
|
|