我試圖運行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 & "' "