问题
I have to query some data from BigQuery. The code looks like this:
function GetQuery(employeeId) {
var projectId = 'xxxx-xx-xxx';
var request = {
query: 'SELECT HOD_Email ' +
'FROM [xxxx-xx-xxx.table_name.dataset] ' +
'WHERE EmployeeId = employeeId'
};
}
And I don't think it works 😅
回答1:
Instead of
'WHERE EmployeeId = employeeId'
try
'WHERE EmployeeId = "' + employeeId + '"'
来源:https://stackoverflow.com/questions/53862192/how-to-pass-a-variable-to-sql-query-on-appmaker