04-21-2021, 05:48 PM
(04-21-2021, 05:36 PM)clarencemartin Wrote: the added tableID is not included in my table name.
this is the code that I used:
local tNewName, tOutputA, tProjectID, tTableID
put cdb_projectID(,USMDdata) into tProjectID
put "cdbUsers-" & "c1d46708-7c49-4183-99fa-3741ffa8ae5e" into tNewName
put "dd07bc8c-1ec5-473b-aabb-5271c60a9bb6" into tTableID
cdb_renameTable tTableID,tNewName
put cdb_tableName(tTableID) into tOutputA
what am I doing that is wrong?
Try the code below:
Code:
local tNewName, tOutputA, tProjectID, tTableID
put cdb_projectID(,"USMDdata") into tProjectID
put "cdbUsers-" & tProjectID into tNewName
put "dd07bc8c-1ec5-473b-aabb-5271c60a9bb6" into tTableID
cdb_renameTable tTableID,tNewName
put cdb_tableName(tTableID) into tOutputA
The output should be "cdbUsers-" followed by the project ID of "USMDdata".