How do I create a table with data selected via a pass through que.

K

kandamj

I see the data using a pass thru select query but when I try to use the query
in a separate make tabel query, I get an error message. Has anyone done this
before? Thx.
 
J

John W. Vinson

I see the data using a pass thru select query but when I try to use the query
in a separate make tabel query, I get an error message. Has anyone done this
before? Thx.

You may want to try saving the passthrough query, and base a new MakeTable
query on that saved query.

The passthrough query runs on the host, and has no way to know anything about
your local Access tables - so a passthrough by itself cannot be a MakeTable or
Append query, to the best of my knowledge.

John W. Vinson [MVP]
 
K

kandamj

Thank you for your reply. However, that is what I tried. The pass thru
works fine by itself but as the source in the make table query, I get an
error message. I inadvertently left the problem and the copy of the error
message at the office so I'll have to continue this on Monday.
 
K

kandamj

Here is the pass thru query I used as input to a make table query:
SELECT Left(vw7801_CHASSIS_k1.CHS_NO,6) AS Chassis,
vw7801_CHASSIS_k1.MDL_CD,
vw7801_CHASSIS_k1.CHS_UN_TYP_CD,
vw7801_CHASSIS_k1.CHS_CUS_STK_TYP_CD,
vw7801_CHASSIS_k1.CHS_ITD_SVC_TYP_CD,
vw7801_CHASSIS_k1.SLP_TYP_CD,
vw7801_CHASSIS_k1.CHS_CDY_HL_TYP_CD,
vw7801_CHASSIS_k1.CHS_SL_DT,
vw7801_CHASSIS_k1.CHS_ATL_RTL_DT,
vw7801_CHASSIS_k1.CHS_VEH_ID_NO,
vw7801_CHASSIS_k1.OPS_CUS_NM,
vw7801_CHASSIS_k1.CHS_ATL_DLV_DT,
vw7817_MODEL_k1.TRK_CLS_CD,
vw7812_DLR_TRK_k1.DLR_CD
FROM vw7801_CHASSIS_k1
INNER JOIN vw7812_DLR_TRK_k1 ON vw7801_CHASSIS_k1.CHS_NO =
vw7812_DLR_TRK_k1.CHS_NO
INNER JOIN vw7817_MODEL_k1 ON vw7801_CHASSIS_k1.MDL_CD =
vw7817_MODEL_k1.MDL_CD
INNER JOIN vw7813 ON vw7812_DLR_TRK_k1.DLR_CD = vw7813.DLR_CD
WHERE vw7801_CHASSIS_k1.CHS_ATL_RTL_DT is Null AND
vw7801_CHASSIS_k1.CHS_ST_NO Not In (3,4) AND
vw7812_DLR_TRK_k1.DLR_TRK_RTL_DLR_IND='n'

I receive an error message: Invalid argument

Any suggestions? Thank you.
 
J

John W. Vinson

Here is the pass thru query I used as input to a make table query:
SELECT Left(vw7801_CHASSIS_k1.CHS_NO,6) AS Chassis,
vw7801_CHASSIS_k1.MDL_CD,
vw7801_CHASSIS_k1.CHS_UN_TYP_CD,
vw7801_CHASSIS_k1.CHS_CUS_STK_TYP_CD,
vw7801_CHASSIS_k1.CHS_ITD_SVC_TYP_CD,
vw7801_CHASSIS_k1.SLP_TYP_CD,
vw7801_CHASSIS_k1.CHS_CDY_HL_TYP_CD,
vw7801_CHASSIS_k1.CHS_SL_DT,
vw7801_CHASSIS_k1.CHS_ATL_RTL_DT,
vw7801_CHASSIS_k1.CHS_VEH_ID_NO,
vw7801_CHASSIS_k1.OPS_CUS_NM,
vw7801_CHASSIS_k1.CHS_ATL_DLV_DT,
vw7817_MODEL_k1.TRK_CLS_CD,
vw7812_DLR_TRK_k1.DLR_CD
FROM vw7801_CHASSIS_k1
INNER JOIN vw7812_DLR_TRK_k1 ON vw7801_CHASSIS_k1.CHS_NO =
vw7812_DLR_TRK_k1.CHS_NO
INNER JOIN vw7817_MODEL_k1 ON vw7801_CHASSIS_k1.MDL_CD =
vw7817_MODEL_k1.MDL_CD
INNER JOIN vw7813 ON vw7812_DLR_TRK_k1.DLR_CD = vw7813.DLR_CD
WHERE vw7801_CHASSIS_k1.CHS_ATL_RTL_DT is Null AND
vw7801_CHASSIS_k1.CHS_ST_NO Not In (3,4) AND
vw7812_DLR_TRK_k1.DLR_TRK_RTL_DLR_IND='n'

I receive an error message: Invalid argument

My guess is that you're trying to use the Access/JET function Left() in a
passthrough query, and that there is a *different* function named Left on your
server database. What is your server? If it's SQL/Server the Left() function
should still work - don't know about other dbms's!

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top