[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 746
  • Last Modified:

MS Access SQL Problem - Duplicate Output Destination

Hi, I am having a problem with the following SQL statement (also please see attached designer screenshot).

I have 3 tables: "BL_FILE TO GO", "BL_FILE2", and "BL_FILE"

I am trying to insert records into "BL_FILE2 TO GO" from "BL_FILE2" if BL_FILE2.DELIV_NUM = BL_FILE.DELIV_NUM and BL_FILE.PRINTED)<>0

When I run what I have so far, I get an error "Duplicate Output Destination "DELIV_NUM". There are currently no records in "BL_FILE TO GO".

Thanks!

INSERT INTO [BL_FILE2 TO GO] ( DELIV_NUM )
SELECT BL_FILE2.*, BL_FILE2.DELIV_NUM
FROM BL_FILE2 INNER JOIN bl_file ON BL_FILE2.DELIV_NUM = bl_file.DELIV_NUM
WHERE (((bl_file.PRINTED)<>0));

Duplicate-Output-Destination-Err.jpg
0
cafulford
Asked:
cafulford
1 Solution
 
TextReportCommented:
You need to remove the second column DELIV_NUM as this is already in BL_FILE2.*
Cheers, Andrew
0
 
cafulfordAuthor Commented:
Thanks Andrew. I am still learning...obviously.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now