Shot in the Dark APM Tables

Tasks Karen
On Apr 5, 2013 11:50 PM, "Karen Schoenung" <kschoenung@...>
wrote:

> **
>
>
> Jose,
>
> This should get you started. I created this query to find yesterday's
> Sales Orders that were sent through APM. We then use the CSV file to feed
> Service Connect an add a date when the sales order acknowledgement was sent.
>
> SQL query:
> Set NoCount On
>
> SELECT RIGHT(CAST(DocumentTypeId AS Int),3) AS DocType,
> LEFT(REPLACE(CONVERT(varchar(10), Created, 102), '.', '-'), 10) AS
> CreateDate,
> LEFT(KeyPropertyValue, 4) AS SalesOrder
> FROM Documents
> WHERE (DocumentTypeId = 132) AND (Created >= CONVERT(varchar(10),
> DATEADD(day, - 1, GETDATE()), 102))
> UNION
> SELECT 'DocType' AS DocType, 'CreateDate' AS CreateDate, 'SalesOrder' AS
> SalesOrder
> ORDER BY DocType DESC
>
> CSV file output:
> DocType,CreateDate,SalesOrder
> 132 ,2013-04-04,8924
> 132 ,2013-04-04,8926
> 132 ,2013-04-04,8927
> 132 ,2013-04-04,8928
> 132 ,2013-04-04,8930
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Friday, April 05, 2013 12:31 PM
> To: Vantage
> Subject: [Vantage] Shot in the Dark APM Tables
>
> Does anyone know which APM Tables hold the "Sent Documents" along with the
> Properties of said document?
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...<mailto:jose%40josecgomez.com>
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Does anyone know which APM Tables hold the "Sent Documents" along with the
Properties of said document?

*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


[Non-text portions of this message have been removed]
Jose,

This should get you started. I created this query to find yesterday's Sales Orders that were sent through APM. We then use the CSV file to feed Service Connect an add a date when the sales order acknowledgement was sent.

SQL query:
Set NoCount On

SELECT RIGHT(CAST(DocumentTypeId AS Int),3) AS DocType, LEFT(REPLACE(CONVERT(varchar(10), Created, 102), '.', '-'), 10) AS CreateDate,
LEFT(KeyPropertyValue, 4) AS SalesOrder
FROM Documents
WHERE (DocumentTypeId = 132) AND (Created >= CONVERT(varchar(10), DATEADD(day, - 1, GETDATE()), 102))
UNION
SELECT 'DocType' AS DocType, 'CreateDate' AS CreateDate, 'SalesOrder' AS SalesOrder
ORDER BY DocType DESC

CSV file output:
DocType,CreateDate,SalesOrder
132 ,2013-04-04,8924
132 ,2013-04-04,8926
132 ,2013-04-04,8927
132 ,2013-04-04,8928
132 ,2013-04-04,8930

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Friday, April 05, 2013 12:31 PM
To: Vantage
Subject: [Vantage] Shot in the Dark APM Tables



Does anyone know which APM Tables hold the "Sent Documents" along with the
Properties of said document?

*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...<mailto:jose%40josecgomez.com>
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]