Archive For The “DB – SQL” Tutte le categorie:

LANGUAGES TYPES MAP

.NET Framework ADO.NET Database SQL Data String Varchar Varchar() String Nvarchar Nvarchar() String NChar Nchar() String NText NText String Text Text Double BigInt Float DateTime DateTime Datetime DateTime SmallDateTime Smalldatetime Int Int Int Int64 BigInt Bigint Int16 SmallInt smallint Byte[] Binary Binary() Byte[] Image Image Byte[] VarBinary Varbinary() Byte TinyInt Tinyint Bool Bit Bit Decimal…

Cube alternative sql script

La query √® un esempio di come mostrare righe + riepilogo senza usare la funzionalit√† CUBE (sfrutta l’order by per creare campi di rottura) (select concat(LPad(rp.CDGRM, 2, ‘0’), LPad(g.CDSET, 2, ‘0’), LPad(g.CDINT, 6, ‘0’), g.PREZZATURA) as BR, 0 AS MTLEVEL, r.STRMERC, r.DESREF, g.CDSET, g.CDINT, g.PREZZATURA, rp.DESCR, rp.CALIBRO, g.NRGIAC, g.VARIETA, g.ORIGINE, o.DSORIG, g.CDCONF, i.DSCONF, g.CDFOR, LEFT(f.RAGSOC,…

Insert/Update command using statement

ORACLE MERGE CLAUSE (EX1) MERGE INTO sigo_magmov m USING (select l.vl_costo costo_lotto, m.rowid fede from sigo_magmov m inner join sigo_lotti l on m.nr_lotto = l.nr_lotto where cd_causale = 76 and m.dt_tem >= ‘20120101’ and not m.nr_lotto is null and m.nr_lotto = 73840) magmov_lotti ON (m.rowid = magmov_lotti.fede) WHEN MATCHED THEN UPDATE SET vl_costo = costo_lotto;…

Go Top