Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8249435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:32:40+00:00 2026-06-07T23:32:40+00:00

I am new so please be gentle. Been using SQL server 2008r2 to create

  • 0

I am new so please be gentle.

Been using SQL server 2008r2 to create a working database based on information pulled from a larger, proprietary SQL database on another server. I am able to pull info into the new table using an INSERT INTO function, but when I attempt to add a linked field from another table on the linked database via a join, I get nowhere. Without further ado, here is my query in all its newbish glory:

INSERT INTO [Cust_Info].[dbo].[form_data]
        (CustNo
        ,LastName
        ,FirstName
        ,Add1
        ,Add2
        ,City
        ,State
        ,Zip
        ,Phone1
        ,Phone2
        ,Email)
SELECT      [CustNo]
        ,[LastName]
        ,[FirstName]
        ,[Add1]
        ,[Add2]
        ,[City]
        ,[State]
        ,[Zip]
        ,[Phone1]
        ,[Phone2]
        ,[Email]

FROM [XYZ-SERVER-1\ETC].[Service].[dbo].[Customer]
JOIN [XYZ-SERVER-1\ETC].[Service].[dbo].[EmailInv] 
ON [Cust_Info].[dbo].[form_data].[CustNo]=[XYZ-SERVER-1\ETC].[Service].[dbo].
[EmailInv].[CustNo]

I am sure I am making a very noob mistake, but I continue to get “Msg 4104″s on the “ON” line, and a “Msg 209” (Ambiguous column name ‘CustNo’) on the first line of the select statement.

I have sorted through many related posts on different forums, and by my account this should work. Can one of you vets please show this noob the light?

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:32:41+00:00Added an answer on June 7, 2026 at 11:32 pm

    Well, one thing I notice is you are attempting to INSERT INTO your table [Cust_Info].[dbo].[form_data] but you are not JOINing on this table in the JOIN statement. So your JOIN syntax does not appear to be correct. I am guessing you are trying to JOIN this way, please notice that I used aliases:

    INSERT INTO [Cust_Info].[dbo].[form_data]
    (
        CustNo
        ,LastName
        ,FirstName
        ,Add1
        ,Add2
        ,City
        ,State
        ,Zip
        ,Phone1
        ,Phone2
        ,Email
    )
    SELECT [CustNo] -- which table is this from select the alias? 
        ,[LastName]
        ,[FirstName]
        ,[Add1]
        ,[Add2]
        ,[City]
        ,[State]
        ,[Zip]
        ,[Phone1]
        ,[Phone2]
        ,[Email]
    
    FROM [XYZ-SERVER-1\ETC].[Service].[dbo].[Customer] c
    JOIN [XYZ-SERVER-1\ETC].[Service].[dbo].[EmailInv] e
        ON c.[CustNo]=e.[CustNo]
    

    but you also need to specify which table, each of the columns is coming from. For example, the [CustNo] in the SELECT is in two tables, which one do you need?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New but keen jquery user here, please be gentle :) I am using the
hi guys i am really new to sql so please be gentle with me
I am fairly new to c#, please be gentle to me, I have been
I am new to css and web design so please be gentle ;-) I
First off, I'm new to Java, so please be gentle. I have a JFrame
New to MVVM so please excuse my ignorance. I THINK i'm using it right
Totally new to Drupal so be gentle please! Let's say I have a number
I'm relatively new with hibernate so please be gentle. I'm having an issue with
Brand spanking new to Regex in Rails so please be gentle... I found the
I am completely new to this game, so please be gentle ;-) I made

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.