Quantcast
Channel: SCN : Unanswered Discussions - SAP on SQL Server
Viewing all articles
Browse latest Browse all 519

Question regarding Joins and Union

$
0
0

Hi All,

 

Here is the question:

 

I have two databases, on which I made a UNION to see both item codes and item names. The issue is that on one database I have an item with the same code than the other, but due human error, on the other database, I have the same name but with an "s" or something like that.

 

What I need to do is, when I make a query, I want to see all item codes from both tables, but I want to see only the description from the db1.

 

How can I do this?

 

 

                              |      db1                  |    db 2

---------------------------   |  -------------------------  | ---------------------------   

itemcode                 |     ART001            |   ART001

item name               |     Rock                |   Rocks


Viewing all articles
Browse latest Browse all 519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>