如何在AppMaker上将变量传递给SQL查询?

时间:2018-12-20 03:51:25

标签: google-bigquery google-app-maker

我必须从BigQuery查询一些数据。代码如下:

function GetQuery(employeeId) {
 var projectId = 'xxxx-xx-xxx';
   var request = {
     query: 'SELECT HOD_Email ' +
            'FROM [xxxx-xx-xxx.table_name.dataset] ' +
            'WHERE EmployeeId = employeeId'
   };
 }

我认为它不起作用

1 个答案:

答案 0 :(得分:1)

代替

'WHERE EmployeeId = employeeId'   

尝试

'WHERE EmployeeId = "' + employeeId + '"'