Davidmc555
Programmer
Hi.
I'm hoping to update a table with record of customer licensing details. The table itself holds information on ClientID, Client name, License, License Date, Activation Date etc. Now, the Client can have many license keys without having activated as the license keys allows access to locked modules within the product. Therefore it's reasonable to assume that the same client ID could appear with multiple license keys but no activation dates.
What I'm hoping to do is make a query that will check for a client ID and license key and update the most recent one based on license date. (A client can request to go back to a previous set of modules on purchase if they want)
So far I have (not working of course)...
I tried TOP and MAX but update doesn't seem to like them and all other posts refer to select queries.
Is anyone able to offer some advise?
Much appreciated!
I'm hoping to update a table with record of customer licensing details. The table itself holds information on ClientID, Client name, License, License Date, Activation Date etc. Now, the Client can have many license keys without having activated as the license keys allows access to locked modules within the product. Therefore it's reasonable to assume that the same client ID could appear with multiple license keys but no activation dates.
What I'm hoping to do is make a query that will check for a client ID and license key and update the most recent one based on license date. (A client can request to go back to a previous set of modules on purchase if they want)
So far I have (not working of course)...
Code:
UPDATE License
SET License.licenseActivation = Now()
WHERE ((License.licenseClientID= 1234) AND (License.licenseCode = 1234-1234-1234-1234))
ORDER BY license.licenseDateTime DESC;
I tried TOP and MAX but update doesn't seem to like them and all other posts refer to select queries.
Is anyone able to offer some advise?
Much appreciated!