CODIGO EJERCICIOS

Anuncio
SELECT TOP (1000) [TerritoryID]
,[TerritoryDescription]
,[RegionID]
FROM [Northwind].[dbo].[Territories]
SELECT CAST(productid as varchar(5))+ ':'+name as PRODUCTNAME
FROM SalesLT.Product;
select CONVERT(varchar(5),productid)+':'+name as PRODUCTNAME
FROM SalesLT.Product;
SELECT Sellstartdate,
CONVERT(nvarchar(30),Sellstartdate)as convertedate,
CONVERT(nvarchar(30),Sellstartdate,126)as iso8601formatdate
FROM SalesLT.Product;
SELECT name, CAST(size as integer) as NUMERICsize
FROM SalesLT.Product;
SELECT name, TRY_CAST (size as integer) as NUMERICsize
FROM SalesLT.Product;
SELECT name, ISNULL(TRY_CAST(size as integer),0)as NUMERICsize
FROM salesLT.product;
SELECT productnumber, ISNULL(color,'')+',' +ISNULL(size,'')as productdetails
FROM SalesLT.product;
SELECT productnumber, ISNULL(color,'multi') as singcolor
FROM SalesLT.product;
SELECT Name, COALESCE(DiscontinueDate, SellenDate, Sellstartdate) AS FIRSTNonNulldate
FROM SalesLT.product;
Descargar