Solved

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

Posted on 2014-11-04
1
185 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 142

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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 backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now