我试图运行Excel中的一个SQL查询,我想:如何按“排序”列和“包含查询列名”?
1.为了通过我的专栏“工作站名称”
2.包括与查询
列名的查询结果现在它将返回没有列名称的所有列,并且最终用户不知道它是什么。
有人可以帮忙吗?我卡住了!下面是我当前的代码:
strQuery = "select pipelineflow.lciid lciid, ldate, volume, capacity, status, " & _
"pipeline, station, stationname, drn, state, county, owneroperator, companycode, " & _
"pointcode, pointtypeind, flowdirection, pointname, facilitytype, pointlocator, " & _
"pidgridcode from pipelineflow, pipelineproperties " & _
"where pipelineflow.lciid = pipelineproperties.lciid " & _
"and pipelineflow.audit_active = 1 " & _
"and pipelineproperties.audit_active =1 " &
_
"and pipelineflow.ldate " & dtInDate & _
"and pipelineproperties.stationname = '" & Stationname & "' "