EXEC SQL DECLARE x CURSOR FOR SELECT
name, mach_id, vendor, model, os, address
- FROM machine WHERE status = 1 ORDER BY address;
+ FROM machine WHERE status = 1 AND mach_id > 0
+ ORDER BY address;
EXEC SQL OPEN x;
while (1)
{
EXEC SQL FETCH x INTO :name, :id, :vendor, :model, :os, :addr;
if (sqlca.sqlcode)
break;
- if (id == 0)
- continue;
if (!*strtrim(name))
continue;
if ((i = strlen(name)) < 9 || !strchr(name, '.') ||