How can I change the word buin in my query to those in the array?
$DB_NAME_M = "<A>(<B>)";
$TIMESTAMPP = Get-Date;
$TIMESTAMPP = $TIMESTAMPP.ToString("yyyyMMdd");
#Arrays
$DB_ARRAYY = @( "elquisco", "imelbosque", "macul", "lareina", "mpinto", "penalolen", "coquimbo");
#Replace timestamp
$DB_NAME_MIR = $DB_NAME_MIR.Replace('<B>',$TIMESTAMPP);
#Debugging....
#Write-Host $DB_NAME_MIRROR;
#Write-Host $STORAGE_URI_BACKUP;
foreach ($DBB in $DB_ARRAYY)
{
$DB_NAME_MIRR = $DB_NAME_MIR.Replace('<A>',$DBB);
#Debugging
#Write-Host $DB_NAME_MIRR
#Write-Host $URL_FILE_BACKUP
$SQL_SERVER_FULLNAME_QA = getSQLServerFullNameAzureQA;
$TIMEOUT = 300;
$QUERY
/* Nombre usado en la URL */
SELECT @NOMBRE_DOM = 'buin',
@NOMBRE_MUNICIPALIDAD = 'Sitio Mirror - Buin (20180109)',
@URL_DOM = 'mrgbuin.demo.cl',
@DB_DOM = 'mirroring_dbdom_buin(2018-01-09-07:00)'
I need this part of the code in the parts that says buin to change according to the information of the array when it is executed
/* Nombre usado en la URL */
SELECT @NOMBRE_DOM = 'buin',
@NOMBRE_MUNICIPALIDAD = 'Sitio Mirror - Buin (20180109)',
@URL_DOM = 'mrgbuin.demo.cl',
@DB_DOM = 'mirroring_dbdom_buin(2018-01-09-07:00)'