Code lấy info Sivip.Web
USE SIVIPTT133_2021_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIPTT133_2021_APP','SIVIPTT133_2021_sys') order by dbid
SELECT 'SIVIPTT133_2021_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 4007 and status = 1 and ma_dvcs <> 9999
USE SIVIPTT133_2020_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIPTT133_2020_APP','SIVIPTT133_2020_sys') order by dbid
SELECT 'SIVIPTT133_2020_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 2470 and status = 1 and ma_dvcs <> 9999
USE SIVIPTT200_2020_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIPTT200_2020_APP','SIVIPTT200_2020_sys') order by dbid
SELECT 'SIVIPTT200_2020_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 3181 and status = 1 and ma_dvcs <> 9999 and ma_dvcs <> 6868
="'"&A1&"'"&$B$1
USE SIVIP_133_SUNTAX_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIP_133_SUNTAX_APP','SIVIP_133_SUNTAX_sys') order by dbid
SELECT 'SIVIP_133_SUNTAX_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 'S000' and status = 1 and ma_dvcs <> '9999'
USE SIVIP_DOVANCONG_TT133_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIP_DOVANCONG_TT133_APP','SIVIP_DOVANCONG_TT133_sys') order by dbid
SELECT 'SIVIP_DOVANCONG_TT133_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 'C360' and status = 1 and ma_dvcs <> '9999'
USE SIVIPTT88_2022_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIPTT88_2022_APP','SIVIPTT88_2022_sys') order by dbid
SELECT 'SIVIPTT88_2022_APP' as ma_cty, ma_dvcs, '' as line11, ten_dvcs as line21, gc_td1 as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
USE SIVIPTT133_2022_APP
SELECT '9999' as maxuser, dbid, name, case when right(name,3) = 'APP' then '0' ELSE '1' END as sys, convert(varchar, crdate, 120) as crdate, case when right(name,3) = 'APP' then '9999' ELSE '0' END as maxunit
FROM master..sysdatabases
WHERE name in ('SIVIPTT133_2022_APP','SIVIPTT133_2022_sys') order by dbid
SELECT 'SIVIPTT133_2022_APP' as ma_cty, ma_dvcs, '' as line11, N'Bản quyền được cấp trong vòng 48h' as line21, N'Nếu quý khách cần hổ trợ, xin liên lạc Sivip' as line31, ten_dvcs2 as line41, gc_td2 as line51
FROM dmdvcs
where ma_dvcs > 6031 and status = 0 and ma_dvcs <> 9999
Last updated
Was this helpful?