S
Slickuser
Hi,
I'm trying to use my variable in another variable. How can I achieve
that?
I can use + (concat) but it will be a lot me to concatenate.
I have to use 3 variables with 15 replacement.
Ex:
C# Code:
string table = "TABLE_AD";
string name = "BOB";
//???
string abc = (@"SELECT EMAIL
FROM {0}
WHERE IDSID='{1}';",table,name);
My final abc variable will be
SELECT EMAIL FROM TABLE_AD WHERE IDSID='BOB'";
In perl is super easy:
$table = "TABLE_AD";
$name = "BOB";
$abc = "SELECT EMAIL FROM $table WHERE IDSID='$name';";
I'm trying to use my variable in another variable. How can I achieve
that?
I can use + (concat) but it will be a lot me to concatenate.
I have to use 3 variables with 15 replacement.
Ex:
C# Code:
string table = "TABLE_AD";
string name = "BOB";
//???
string abc = (@"SELECT EMAIL
FROM {0}
WHERE IDSID='{1}';",table,name);
My final abc variable will be
SELECT EMAIL FROM TABLE_AD WHERE IDSID='BOB'";
In perl is super easy:
$table = "TABLE_AD";
$name = "BOB";
$abc = "SELECT EMAIL FROM $table WHERE IDSID='$name';";