SELECT
OrderDate,
SUM
(TotalDue) TotalDueByOrderDate
FROM
Sales.SalesOrderHeader
WHERE
OrderDate
BETWEEN
'7/1/2001'
AND
'7/31/2001'
GROUP
BY
ALL
UPDATE
Production.ProductDescription
SET
Description =
'Chromoly steel. High % of defects'
ProductDescriptionID = 3
ProductDescriptionID,Description
Description
LIKE
'%/%%'
ESCAPE
'/'
DISTINCT
ProductID
Production.ProductInventory
AVG
(
ListPrice)
Production.Product;
< function_name > () OVER([PARTITION
]
ORDER
< order_by_list >)
ROW_NUMBER() OVER(
LastName)
AS
RowNum,
FirstName +
' '
+ LastName
HumanResources.vEmployee
JobTitle =
'Production Technician - WC60'
LastName
ROW_NUMBER()
OVER(PARTITION
SUBSTRING
(LastName,1,1)
RowNum, FirstName +
select
t1.col1,t1.col2,t2.col3,t2.col4
from
table1
as
t1
inner
join
t2
on
t1.col1=t2.col1
create
table
#test(i
int
)
insert
into
#test(i)
10
*
#test
.#test
..#test
...#test
#test[.]
#test[..]
#test[...]
#test[....]
#test[.....]
10.35
10.test
test
----- 10
10 .test
Msg 258,
Level
15, State 1, Line 1 Cannot call methods
"Davolio Nancy"
,644
"Fuller Andrew"
,2354
"Leverling Janet"
,4834
"Peacock Margaret"
,1056
"Buchanan Steven"
,6893
"Suyama Michael"
,8195
"King Robert"
,75920
"Callahan Laura"
,7003
"Dodsworth ,t"
,386
test (names
varchar
(100),
no
BULK
INSERT
'F:\testing.txt'
WITH
( FIELDTERMINATOR =
','
,
ROWTERMINATOR =
'\n'
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 9, column 2 (no).
test(names,
OPENROWSET(
'Microsoft.Jet.OLEDB.4.0'
'text;HDR=NO;FMT=FixedLength;Database=F:\'
, testing#txt)
test (id
amount
check
(amount >=1000
and
amount<=5000));
1 700 2 2000 3 870 4 4500
bulk
'f:\test.txt'
with
(fieldterminator=
, rowterminator=
rowterminator=
, check_constraints)
, FIRSTROW =1, LASTROW=3)
'\', FIRSTROW =1, LASTROW=3, ERRORFILE ='
F:\error.txt',
check_constraints)