Hey, How can I add a condition to SQL that will pu...
# suiteql
y
Hey, How can I add a condition to SQL that will pull only transactions that were last modified in the last week,
Copy code
SELECT
  tranid,
  trandate,
  custbody_cl_risk,
  custbody_cl_so_first_payment_date,
  custbody_sf_opp_id,
  lastModifiedDate,
FROM
  Transaction
WHERE
  Transaction.Type='SalesOrd' AND custbody_sf_opp_id is not null
m
Copy code
AND lastmodifieddate > SYSDATE - 7
👑 1
y
Thanks!
@Mike Robbins If I would like to have an SQL of the system notes of 3 specific fields from the sales order transaction, how should the SQL structure be? 🤔
m
typically you'd reach for something like
and sn.field in ('field1', 'field2', 'field3')
but the field names in the
systemnote
table are weird so you would probably need to examine which fields have the values that you see in the UI.