19. August 2010 16:21
SELECT TOP (100) PERCENT objid AS ELO_OBJ_ID, objguid AS ELO_GUID,
(SELECT LEFT(okeydata, 40) AS Expr1
FROM elo01.dbo.objkeys
WHERE (parentid = elo01.dbo.objekte.objid) AND (okeyno = 0)) AS BAR,
(SELECT LEFT(okeydata, 250) AS Expr1
FROM elo01.dbo.objkeys AS objkeys_1
WHERE (parentid = elo01.dbo.objekte.objid) AND (okeyno = 2)) AS KA_NAME,
(SELECT LEFT(okeydata, 10) AS Expr1
FROM elo01.dbo.objkeys AS objkeys_1
WHERE (parentid = elo01.dbo.objekte.objid) AND (okeyno = 24)) AS ELOASSTATUS,
(SELECT LEFT(okeydata, 20) AS Expr1
FROM elo01.dbo.objkeys AS objkeys_1
WHERE (parentid = elo01.dbo.objekte.objid) AND (okeyno = 25)) AS NAVSTAT
FROM elo01.dbo.objekte
WHERE (objmask = 8)
ORDER BY ELO_OBJ_ID