Re: MySQL Database Overwrite data?
This is what i got in return when i ran show create table:
'CREATE ALGORITHM=UNDEFINED DEFINER=`sc_LabTech_1`@`localhost` SQL SECURITY DEFINER VIEW `v_xr_clientsummary` AS select `loc`.`ClientID` AS `ClientID`,count(distinct `loc`.`LocationID`) AS `ClientNumLocations`,count(distinct `cmp`.`ComputerID`) AS `TotalComputers`,ifnull(sum(`opsys`.`Server`),0) AS `TotalServers`,ifnull(sum((not(`opsys`.`Server`))),0) AS `TotalWorkstations`,ifnull(sum((locate(''windows'',`opsys`.`Name`) and `opsys`.`Server`)),0) AS `TotalServersWin`,ifnull(sum((locate(''windows'',`opsys`.`Name`) and (not(`opsys`.`Server`)))),0) AS `TotalWorkstationsWin`,ifnull((select count(`networkdevices`.`DeviceID`) from (`networkdevices` join `locations` on((`networkdevices`.`LocationID` = `locations`.`LocationID`))) where (`locations`.`ClientID` = `loc`.`ClientID`)),0) AS `TotalNetworkDevices`,ifnull(sum((locate(''windows'',`opsys`.`Name`) and (locate(''xp'',`opsys`.`Name`) or locate(''2000'',`opsys`.`Name`)))),0) AS `WksWinXPPrev`,ifnull(sum((locate(''windows'',`opsys`.`Name`) and locate('' 7'',`opsys`.`Name`))),0) AS `WksWin7`,ifnull(sum((locate(''windows'',`opsys`.`Name`) and locate('' 8'',`opsys`.`Name`))),0) AS `WksWin8`,ifnull(sum((locate(''darwin'',`opsys`.`Name`) and (not(`opsys`.`Server`)))),0) AS `WksMac`,ifnull(sum((`opsys`.`Server` and locate(''windows'',`opsys`.`Name`) and (not(locate(''fe'',`opsys`.`Name`))) and (not(locate(''small'',`opsys`.`Name`))))),0) AS `ServerWin`,ifnull(sum((`opsys`.`Server` and locate(''windows'',`opsys`.`Name`) and (locate(''fe'',`opsys`.`Name`) or locate(''small'',`opsys`.`Name`)))),0) AS `ServerSBS`,ifnull(sum((`opsys`.`Server` and locate(''windows'',`opsys`.`Name`) and locate(''2003'',`opsys`.`Name`))),0) AS `Server03`,ifnull(sum((`opsys`.`Server` and locate(''windows'',`opsys`.`Name`) and locate(''2008'',`opsys`.`Name`))),0) AS `Server08`,ifnull(sum((`opsys`.`Server` and locate(''windows'',`opsys`.`Name`) and locate(''2012'',`opsys`.`Name`))),0) AS `Server12`,ifnull(sum(locate(''linux'',`opsys`.`Name`)),0) AS `ServerLinux`,ifnull(sum((locate(''darwin'',`opsys`.`Name`) and `opsys`.`Server`)),0) AS `ServerMac` from ((`locations` `loc` join `computers` `cmp` on((`loc`.`LocationID` = `cmp`.`LocationID`))) join `inv_operatingsystem` `opsys` on((`cmp`.`ComputerID` = `opsys`.`ComputerID`))) group by `loc`.`ClientID`'
character_set_client: utf8
collation_connectionL utf8_general_ci