Skip to Content

Help getting the 'created by' user into a query


Hi, I have a query that shows all the newly created customer accounts.

I'm using the OCRD table. I need to add the 'created by' user to the script if possible. I can't see any field that gives me the user that created the account in this table. Does anyone know how I could get the into my script? At the moment, this information is on the Tools-Show history screen. Thanks, Eoin.

My query:

SELECT T0.[CardCode], T0.[CardName], T0.[CmpPrivate],T0.[CreateDate], T1.Groupname, T0.[Phone1],T0.[CntctPrsn],T0.[E_Mail],T0.[StreetNo],T0.[Address], T0.[City], T0.[County], T0.[Country], T0.[ZipCode], T0.[QryGroup1] as 'Account Reviewed', T0.[MailStrNo], T0.[MailAddres], T0.[MailCity], T0.[MailCounty], T0.[MailCountr], T0.[MailZipCod] FROM OCRD T0 inner join ocrg T1 on t0.groupcode=t1.groupcode
created-by-field.pngWHERE T0.[CardType] ='C' and T0.[CreateDate] > '2018-01-20' AND T0.[QryGroup1]='N' ORDER BY T0.[CreateDate]

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 08, 2018 at 10:30 AM

    There is a creating user data in OCRD table in the field UserSign. If you join it to OUSR table, you can get the name of the user

    Add comment
    10|10000 characters needed characters exceeded