Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

alle VLANs mit Subnets

MS SQL-Server

SELECT 
  tbltag.strVlanId ID,
  tbltag.strName VLAN,
  tbltag.strDescription Description,
  'Subnet' = 
  CASE
    WHEN tbltaggroup.strName IS NOT NULL 
    THEN CONCAT(tbltaggroup.strName, '/', tbltaggroup.intCIDR)
    ELSE ''
    END
FROM
  tbltag
LEFT JOIN tbltaggroup
ON
  tbltag.intId_pk = tbltaggroup.intVlanId_fk
WHERE
  tbltag.strClassName = 'TBoNisTagVLAN'
ORDER BY ID ASC

SQLite

SELECT 
  tbltag.strVlanId ID,
  tbltag.strName VLAN,
  tbltag.strDescription Description,
  tbltaggroup.strName || '/' || tbltaggroup.intCIDR Subnet
FROM
  tbltag
LEFT JOIN tbltaggroup
ON
  tbltag.intId_pk = tbltaggroup.intVlanId_fk
WHERE
  tbltag.strClassName = "TBoNisTagVLAN"
ORDER BY ID ASC
  • No labels