Be.Smart ERP Connector
(EN) ERP Connector
(EN) ERP Connector
  • â„šī¸What is ERP Connector?
  • âš™ī¸System Requirements
  • 🆕What's New
    • Versions 29.2.1.0, 28.7.1.0, 27.13.0.0
    • Versions 29.1.0.0, 28.6.0.0, 27.12.0.0
    • Versions 29.0.0.1 & 28.5.1.1
  • Data Interface - Reference Manual
    • Abbreviations
    • Data interface
    • Data tables, relations
      • Table EcENTITY
      • Table EcASSOC
      • Table EcLINK
      • Table EcLOG
      • Stored procedure EcWriteEntity
    • Exporting data from a Vault
    • Properties / Attributes
    • Associations
    • Links
    • Reading data from data interface
      • Workflow sample
      • Another samples
    • Importing data into a Vault
    • Mandatory EcENTITY table fields
    • Default values
    • LifeCycle States
    • Writing data into data interface
      • Using SQL Stored Procedure
        • Example #1 – insert single EcENTITY record
        • Example #2 – insert two associated EcENTITY records
      • Using SQL syntax
      • Using SQL Management Studio
    • SQL views
    • ERP data displayed dynamically in VE Tab
    • SQL view definition sample:
    • ERP synchronized enums
    • Logging
    • Using thumbnail image data
Powered by GitBook
On this page
  1. Data Interface - Reference Manual
  2. Reading data from data interface

Another samples

//select all entities within the bulk - the bulk_top (BIT) column is added to identify the top entity in a bulk
SELECT CAST(CASE WHEN EXISTS(SELECT * FROM EcASSOC WHERE EcENTITY.id=EcASSOC.ent_id_child) THEN 0 
ELSE 1 END AS BIT) AS bulk_top, * FROM EcENTITY WHERE bulk_id=@BulkId ORDER BY id DESC

//all association records EcASSOC joined with the child entity attributes (all bulk associations)
SELECT EcENTITY.*, EcASSOC.* FROM EcASSOC LEFT JOIN EcENTITY ON EcASSOC.ent_id_child=EcENTITY.id 
WHERE (EcENTITY.bulk_id=@BulkId)

Warning

never update (change) the EcENTITY.comm_dir value in the bulk ! the whole bulk must have single EcENTITY.comm_dir value !

PreviousWorkflow sampleNextImporting data into a Vault