Viewing 15 posts - 1,786 through 1,800 (of 2,171 total)
select *
from @mytable
where row_number() over (partition by itemname order by itemvalue desc) = 2
order by itemname
N 56°04'39.16"
E 12°55'05.25"
Run this
select d.itemname,
max(x.itemno) as itemno,
d.qwerty
from (
select t1.itemname,
(select min(itemvalue) from (select top 2 t2.itemvalue from @mytable as t2 where t2.itemname = t1.itemname order by t2.itemvalue desc) as d) as qwerty
from @mytable as t1
 
N 56°04'39.16"
E 12°55'05.25"
update c
set c.col3 = d.qwerty
from tableA as c
inner join (
select a.col2,
count(b.idcol) as qwerty
from tableB as b
inner join tableA as a on a.idcol = b.idcol
group by a.col2
 
as d on c.col2 =...
N 56°04'39.16"
E 12°55'05.25"
SELECT NULLIF(Col001, 'NULL') AS NewCol1,
NULLIF(Col002, 'NULL') AS NewCol2
FROM <YourTableNameHere>
N 56°04'39.16"
E 12°55'05.25"
set @return = isnull(@return, 0) + 1
N 56°04'39.16"
E 12°55'05.25"
You want just the date?
SELECT DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0)
N 56°04'39.16"
E 12°55'05.25"
Using UNION ALL can potentially lead to duplicates, if both fieldA and fieldB contains the text "my".
Replace UNION ALL with UNION only to get correct result. But then the query...
N 56°04'39.16"
E 12°55'05.25"
Also asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74180
N 56°04'39.16"
E 12°55'05.25"
Something like
INSERT Target
SELECT PIN, <someothercolumns> FROM Source
UNION ALL
SELECT PIN, <someothercolumns> FROM Source
UNION ALL
SELECT PIN, <someothercolumns> FROM Source
N 56°04'39.16"
E 12°55'05.25"
http://www.connectionstrings.com
Also, there are massive information here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
N 56°04'39.16"
E 12°55'05.25"
Also asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73899
N 56°04'39.16"
E 12°55'05.25"
Fast generic solution posted here
http://www.sqlteam.com/forums/topic.asp?whichpage=2&TOPIC_ID=73610񀞄
N 56°04'39.16"
E 12°55'05.25"
Ok, now I follow you!
N 56°04'39.16"
E 12°55'05.25"
Viewing 15 posts - 1,786 through 1,800 (of 2,171 total)