Friday, 19 October 2012

#28 Replace di sql server

Berikut contoh simpel penggunaan replace di sql server:

select REPLACE
(
    path,
    (select path from MStructureOrganisation where id=(select parentid from MStructureOrganisation where id=128)),
    (select path from MStructureOrganisation where id=192)
)
from MStructureOrganisation where path like '0;0000375;0001099;0001099;0000542%'

0 comments:

Post a Comment