Well, I am getting closer.
I created a SQL query that is run by SQL Server on a regular basis and creates a kml file in a certain location on a certain server. Once there, I link to it using a Network Link and set it to refresh every so often.
The only thing I haven't worked out yet is how to change the icons. The script I was using as a basis uses
root://icons/etc but I have been unable to get this to work. If I could work out what the coding for the icons is, I could use the data in the database to assign the correct icon to each placemark when the sql is generated with a 'case' statement. And then the job is done.
Does anyone have a bit more detailed instruction on how the <icon>, <styleUrl> and <Style> tags work?
John