Moved project directories and files to an empty local repo

This commit is contained in:
Dave Morriss
2024-06-04 16:35:44 +01:00
parent 2d2b937a9b
commit 38abbcdd39
271 changed files with 55348 additions and 0 deletions

18
Database/double_host.sql Normal file
View File

@@ -0,0 +1,18 @@
/*---------------------------------------------------------------------------
* Written a while ago. I think it finds hosts called "'host1' and 'host2'"
* and pulls the individual hosts out of the pair so that they can be
* installed into the table as separate hosts
---------------------------------------------------------------------------- */
select ho.hostid, ho.host, n1.hostid, n1.host, n1.host1, n2.hostid, n2.host, n2.host2
from hosts ho
left join (select hostid, host, left(host,instr(host,' and ')-1) as host1
from hosts
where host like '% and %') as n1
on n1.host1 = ho.host
left join (select hostid, host, substring(host,instr(host,' and ')+5) as host2
from hosts
where host like '% and %') as n2
on n2.host2 = ho.host
where n1.host1 is not null
or n2.host2 is not null
;