I need to rearrange a table that has values stored in 12 fields, one for each month. Below is the union query that I wrote, it does give me what I'm looking for but errors if I make it a pass-thru. Running as a non-pass-thru takes FOREVER!
I need to be able to perform the concatenation on the first field or create a column that just contains the 01 or 02 value and I can combine them later.
SELECT
PATIENT_ACTG_J_ACCOUNT_MSTR.fSCL_YR & "01" AS AcctPeriod,
PATIENT_ACTG_J_ACCOUNT_MSTR.GL_DPT,
PATIENT_ACTG_J_ACCOUNT_MSTR.SUBACCT,
PATIENT_ACTG_J_ACCOUNT_MSTR.ACT_PER_01 as DollarValue
FROM
PATIENT_ACTG_J_ACCOUNT_MSTR
Union Select
PATIENT_ACTG_J_ACCOUNT_MSTR.fSCL_YR & "02" AS AcctPeriod,
PATIENT_ACTG_J_ACCOUNT_MSTR.GL_DPT,
PATIENT_ACTG_J_ACCOUNT_MSTR.SUBACCT,
PATIENT_ACTG_J_ACCOUNT_MSTR.ACT_PER_02 as DollarValue
FROM
PATIENT_ACTG_J_ACCOUNT_MSTR;
This code runs and gives me the values I am looking for. It will need further manipulation since the hospital code is actually the first two digits of the GL_DPT code. I'd like instruction on how to put that into a pass-thru.
Any suggestions for running as a pass-thru?
Access 2003 in 2000 format
I need to be able to perform the concatenation on the first field or create a column that just contains the 01 or 02 value and I can combine them later.
SELECT
PATIENT_ACTG_J_ACCOUNT_MSTR.fSCL_YR & "01" AS AcctPeriod,
PATIENT_ACTG_J_ACCOUNT_MSTR.GL_DPT,
PATIENT_ACTG_J_ACCOUNT_MSTR.SUBACCT,
PATIENT_ACTG_J_ACCOUNT_MSTR.ACT_PER_01 as DollarValue
FROM
PATIENT_ACTG_J_ACCOUNT_MSTR
Union Select
PATIENT_ACTG_J_ACCOUNT_MSTR.fSCL_YR & "02" AS AcctPeriod,
PATIENT_ACTG_J_ACCOUNT_MSTR.GL_DPT,
PATIENT_ACTG_J_ACCOUNT_MSTR.SUBACCT,
PATIENT_ACTG_J_ACCOUNT_MSTR.ACT_PER_02 as DollarValue
FROM
PATIENT_ACTG_J_ACCOUNT_MSTR;
This code runs and gives me the values I am looking for. It will need further manipulation since the hospital code is actually the first two digits of the GL_DPT code. I'd like instruction on how to put that into a pass-thru.
Any suggestions for running as a pass-thru?
Access 2003 in 2000 format