0

Does anyone know if a one can query a 4D database selecting all of a particular table like one can do in MySQL? I haven't been able to find any documentation on it.

Fails

I've tried this query but it fails to parse Syntax error: 1301 Failed to parse statement.

SELECT c.Customer_Name, p.*
FROM Customer c
JOIN EOE_EDI_Partner p ON p.BillTo_Customer_ID = c.Customer_ID

Works

This works, but gets data from both tables

SELECT *
FROM Customer c
JOIN EOE_EDI_Partner p ON p.BillTo_Customer_ID = c.Customer_ID

And I'd like to refrain from writing out each field in the desired table (its a lot)

SELECT p.Name, p.ID, p.FieldName, p.......
FROM Customer c
JOIN EOE_EDI_Partner p ON p.BillTo_Customer_ID = c.Customer_ID
Kevin Jantzer
  • 9,215
  • 2
  • 28
  • 52

1 Answers1

0

The doc ( 4D SQL Reference: SELECT ) says it's not possible:

Queries with mixed "*" and explicit fields are not allowed.

They suggest to use * to have all field from both tables (as you made in you first working example) that is:

SELECT * FROM t1, t2

Also you cannot use a subquery instead of t1, I verified it.

Umberto Migliore
  • 317
  • 4
  • 17