SQL - Pick all fields from another table and just a few from

Posted by joey eisma on 04-Apr-2017 12:06

Hi,

This construct does not work Progress, but works in other SQL based database.

SELECT Orders.*, Customers.CustomerName
FROM Orders
INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;

How to do it in Progress?

Thanks!

All Replies

Posted by joey eisma on 04-Apr-2017 12:55

Sorry. Above construct actually works.

Posted by asaynes on 11-Apr-2017 21:29

 
Hi Joey,
 
Trying on a sports2000 database a similar query runs fine:
 
SQLExplorer>select order.*,customer.name  from pub.order inner join pub.customer on order.custnum = customer.custnum;
   Ordernum     CustNum OrderDate  ShipDate   PromiseDate Carrier                                            Instructions                                                                                         PO                                       Terms                                    SalesRep    BillToID    ShipToID OrderStatus                              WarehouseNum Creditcard                               Name                                                       
----------- ----------- ---------- ---------- ----------- -------------------------------------------------- ---------------------------------------------------------------------------------------------------- ---------------------------------------- ---------------------------------------- -------- ----------- ----------- ---------------------------------------- ------------ ---------------------------------------- ------------------------------------------------------------
 
<Data result here ……………………………..>
 
 
What do you get?
Did you get any errors?
What OE version are you using?
 
 

This thread is closed