I work for a school district. Every year we have to export a list of students from our student management system and send it to a company that handles our online exams.
So to do this export, we had to hire someone who knew the inner workings of our student management system. He wrote an sql (Adaptive Sybase SQL Anywhere) query to export the students to a csv file like we needed. This was before I started working for the district, so for a while I assumed this was an actually application, until it came time for me to do the export myself.
And every year he charges us $500 to update this query to export the students for the current year. So when I discovered it was only a query (.bat file and .sql file), my thought was "I can update this myself". All I have to do is change the years in the query (eg. 2009 to 2010).
The query (.sql file) itself has this comment at the top:
// This code was writtend by [the guy]
// and is the property of [his company]...Copyright 2005,2006,2008,2009
// This code MAY NOT BE USED without the expressed written consent of
// [his company].
(Yes, it really does says "writtend".)
So now my boss is worried that we're violating the copyright. And that the guy is gonna find out that I updated the query myself because we haven't asked him to update it this year and take legal action.
So back to the subject's question:
Can he really copyright this query?
And if so, is modifying it ourselves a copyright violation?
In my mind, a single query isn't program code. It's more a command line command. But I don't know what it's considered legally.