Solved

insert a column into a table from another table with different names

Posted on 2014-11-04
1
192 Views
Last Modified: 2014-11-04
INSERT INTO isvgroups (ISVApp)
SELECT isvapplication  FROM SLXActApplications
WHERE SLXActApplications.ISVApplication<>isvgroups.ISVApp

this comes back and fails

Msg 4104, Level 16, State 1, Line 3
The multi-part identifier "isvgroups.ISVApp" could not be bound.
0
Comment
Question by:Chris Michalczuk
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40421381
you want to do this:

INSERT INTO isvgroups (ISVApp)
SELECT isvapplication  FROM SLXActApplications
WHERE NOT EXISTS( SELECT null FROM isvgroups WHERE SLXActApplications.ISVApplication = isvgroups.ISVApp )

Open in new window

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
T-SQL 10 35
TSQL Challenge... 7 35
Location of Dynamics AX Service accounts in SQL 3 15
SQL Syntax Grouping Sum question 7 24
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question