Top 50%
----------
select top 50 percent *
from table1
order by id asc
Bottom 50%
---------------
select top 50 percent *
from table1
order by id desc
September 23, 2016
September 21, 2016
Update from select
Update table1
from
(
select
t1.x,
t1.y
from table2 t2
left join table3 t3
on t2.id = t3.id
) input
set f1 = input.x
where f2 = input.y
from
(
select
t1.x,
t1.y
from table2 t2
left join table3 t3
on t2.id = t3.id
) input
set f1 = input.x
where f2 = input.y
Insert into with select
Insert into table1
(
field1,
field2,
field3
)
select
t2.x,
t2.y,
t3.x
from table2 t2
left join table3 t3
on t2.id = t3.id
(
field1,
field2,
field3
)
select
t2.x,
t2.y,
t3.x
from table2 t2
left join table3 t3
on t2.id = t3.id
September 14, 2016
Remove carriage returns from a field
select oTranslate(afield, '0A0D'xc,' ') from atable
Subscribe to:
Posts (Atom)