13.07.2015 Views

1 Vježba 2: (SQL Server) Rješenja: Koristiti funkcije: - FESB

1 Vježba 2: (SQL Server) Rješenja: Koristiti funkcije: - FESB

1 Vježba 2: (SQL Server) Rješenja: Koristiti funkcije: - FESB

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Fakultet elektrotehnike, strojarstva i brodogradnje BAZE PODATAKA 2Također koristeći alias za tablicu NASTAVNIK koja je u dvostrukoj vezi sa tablicomNASTAVNI_PLAN napisati SELECT naredbu (za obraz. program 450 i šk. godinu 2008/09) kojadaje ovakav rezultat:……DODATAK 1:Using CONVERT:CONVERT ( data_type [ ( length ) ] , expression [ , style ] )Arguments:expressionIs any valid Microsoft® <strong>SQL</strong> <strong>Server</strong> expression.data_typeIs the target system-supplied data type.lengthIs an optional parameter of nchar, nvarchar, char, varchar, binary, or varbinary data types.styleIs the style of date format used to convert datetime or smalldatetime data to character data (nchar, nvarchar,char, varchar, nchar, or nvarchar data types), or the string format when converting float, real, money, orsmallmoney data to character data (nchar, nvarchar, char, varchar, nchar, or nvarchar data types).<strong>SQL</strong> <strong>Server</strong> supports the date format in Arabic style, using Kuwaiti algorithm.In the table, the two columns on the left represent the style values for datetime or smalldatetime conversion tocharacter data.Add 100 to a style value to get a four-place year that includes the century (yyyy).Without century (yy) With century (yyyy) Standard Input/Output- 0 or 100 (*) Default mon dd yyyy hh:miAM (orPM)1 101 USA mm/dd/yy2 102 ANSI yy.mm.dd3 103 British/French dd/mm/yy4 104 German dd.mm.yy5 105 Italian dd-mm-yy6 106 - dd mon yy.........622.11.2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!