View Single Post
Old 09-06-2019, 03:23 AM   #1
FueledbyAccess
Newly Registered User
 
Join Date: Sep 2019
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
FueledbyAccess is on a distinguished road
Union query asking to Enter Parameter Values

Hello

I've seen various threads on similar problems as mine but none have been able to resolve the issue.

I have 3 tables I want to append using a union query, as I don't want all the columns I'm not using the

Select * From

but instead entering the column headings I want, below is my SQL code in full

Select all
[Nominal Code], Date, Period, Origin, Type, [Journal Type], Batched, [Header Line No#], [Header Ref#], Debit, Credit, Reconciled, [Internal Ref#], [Batch Ref#], [Account Code], [Analysis Code], [Price Code], Year, [Project Code2], [Cost Header Name], [Cost Centre Code2], [Audit No#], [Account Name], SL_ACC_USER1, SL_ACC_USER2, SL_ACC_USER3, [Home to 2nd Base Rate], [Currency Rate], [Journal Detail Ref#], [Nominal Account Name], Quantity, [Sub Ledger Audit No#]

FROM [Nominal Transactions open]

UNION ALL select
[Nominal Code], Date, Period, Origin, Type, [Journal Type], Batched, [Header Line No#], [Header Ref#], Debit, Credit, Reconciled, [Internal Ref#], [Batch Ref#], [Account Code], [Analysis Code], [Price Code], Year, [Project Code2], [Cost Header Name], [Cost Centre Code2], [Audit No#], [Account Name], SL_ACC_USER1, SL_ACC_USER2, SL_ACC_USER3, [Home to 2nd Base Rate], [Currency Rate], [Journal Detail Ref#], [Nominal Account Name], Quantity, [Sub Ledger Audit No#]

from
[Nominal Transactions closed]

UNION ALL select
[Nominal Code], Date, Period, Origin, Type, [Journal Type], Batched, [Header Line No#], [Header Ref#], Debit, Credit, Reconciled, [Internal Ref#], [Batch Ref#], [Account Code], [Analysis Code], [Price Code], Year, [Project Code2], [Cost Header Name], [Cost Centre Code2], [Audit No#], [Account Name], SL_ACC_USER1, SL_ACC_USER2, SL_ACC_USER3, [Home to 2nd Base Rate], [Currency Rate], [Journal Detail Ref#], [Nominal Account Name], Quantity, [Sub Ledger Audit No#]

From
tbl_Accruals;


The issue I'm getting is that for SL_ACC_USER1, SL_ACC_USER2, SL_ACC_USER3 I'm being asked to 'Enter Parameter Values'

I've checked and the column headings are valid in the tables and spelled correctly so I've no idea what's causing the problem.

FueledbyAccess is offline   Reply With Quote