Hello All.
I need help and direction with something along the lines of an update query, but where the update is dynamic, rather than static.
I am neither a database/SQL or programming expert so go easy on me!!
I have written a query to select the records in a single table that need updating but don’t know how to update since it is not a simple update query.
The query returns for example:
Hostname | Port Name
switchABC | switchABC_Ethernet100/1/1
switchABC | switchABC_Ethernet100/1/2
switchDEF | switchABC_Ethernet101/1/1
For all records that the query matches, I want to extract the “100” from the Port Name, and append to the hostname to achieve a new hostname of “switchABC-100”
At the moment I’m not sure where to start?
I need help and direction with something along the lines of an update query, but where the update is dynamic, rather than static.
I am neither a database/SQL or programming expert so go easy on me!!
I have written a query to select the records in a single table that need updating but don’t know how to update since it is not a simple update query.
The query returns for example:
Hostname | Port Name
switchABC | switchABC_Ethernet100/1/1
switchABC | switchABC_Ethernet100/1/2
switchDEF | switchABC_Ethernet101/1/1
For all records that the query matches, I want to extract the “100” from the Port Name, and append to the hostname to achieve a new hostname of “switchABC-100”
At the moment I’m not sure where to start?