tsql - How can I write a SQL select statement to include a lookup from another table? -


I am copying data from one database to another and when I'm on it, I am margining data. Both databases have tables called "clients" and jobs

However, the database "alpha" does not have any relation to the database table, where the database does "epsilon" in the jobs table of alpha, only one in the manifest column of the customer The name is

To see the client's table in their clients table by their name, I need a request statement, when I am putting it in jobs table in APCLON. / P>

My incomplete SQL statement looks like this:

  Insert in Epicelon W.jobs (Select Client ID, Name, Location, Date), Name, Location, Alphabet Date dated from Jobs.  

How can I modify it so that ???? Includes ClientId from Client Table in Epiclon? I know that I need to look at the data using the name column in the jobs, but I can not understand the syntax for it.

  insert in Epsilon.dbo.Jobs (ClientId, name, location, dated) c. ClientID, a.Name, a.Location, a.DateCreated from Alpha.dbo.Jobs Insert Epsilon .dbo.Client c on c.Name = a.ClientName  

This is a lot Optimists are involved, but even if it needs to be modified, you should give it a general idea.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -