FROM
dbo.CV3Client INNER JOIN
dbo.CV3OrderStatusHistory ON dbo.CV3Client.GUID = dbo.CV3OrderStatusHistory.ClientGUID
INNER JOIN
dbo.CV3ClientVisit ON dbo.CV3Client.GUID= dbo.CV3ClientVisit.ClientGUID
WHERE
(dbo.CV3Client.DisplayName = 'XTEST, TESTONE' OR
dbo.CV3Client.DisplayName = 'XTEST, TESTTWO')
AND (dbo.CV3OrderStatusHistory.CreatedWhen >= '20070101')
AND
(dbo.CV3OrderStatusHistory.CreatedWhen < '20070216') AND (dbo.CV3OrderStatusHistory.ReasonText LIKE 'Filler Order ID:%' OR dbo.CV3OrderStatusHistory.ReasonText LIKE 'Placer Order ID:%')
AND (dbo.CV3OrderStatusHistory.OrderStatusCode = 'PERF' OR dbo.CV3OrderStatusHistory.OrderStatusCode = 'SCHD') AND (dbo.CV3ClientVisit.VisitIDCode = '111111111' OR
dbo.CV3ClientVisit.VisitIDCode = '222222222')
ORDER BY dbo.CV3ClientVisit.VisitIDCode
This gives me: 17 Placer Order ID:<1020517276830> Placer Facility: <RAD> Filler Order ID: <1020517276830> Filler Facility ID: <RAD> XTEST, TESTONE 2007-01-26 13:05:36.127 SCHD 111111111 18 Filler Order ID: <1018863276856> Filler Facility ID: <RAD> XTEST, TESTONE 2007-01-26 13:10:11.170 PERF 111111111
If you join CV3OrderStatusHistory to table CV3AncillaryOrderID on OrderGUID = OrderGUID you can just use the OrderID column. Why parse it out of the text?
[COLOR=black #d0d0d0]My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes![/color]
By the way, I am not 100% sure that's right, I found it by searching. But it seems to match based on my queries. Ask Eclipsys.
[COLOR=black #d0d0d0]My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes![/color]
You could as easily have found that table by doing a search for columns in the database like '%order%id%'.
And also, isn't there anyone else at your company that you can ask for help with SXA?
[COLOR=black #d0d0d0]My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes![/color]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.