Showing posts with label history. Show all posts
Showing posts with label history. Show all posts

Wednesday, March 7, 2012

Quick DMX question

Is there anyway to predict what a customer is likely to buy based on their purchase history?

What I would like to do is something simliar to using a natural prediction join with multiple union selects, but with data supplied from my purchases table.

So I need something like this:

Code Snippet

Openquery([ds], 'SELECT DISTINCT [PurchasedProductID] FROM [Table] WHERE [CompanyName] = 'a')

To work like how this works:

Code Snippet

(SELECT (SELECT '1234' AS [ProductID] UNION SELECT '12345' AS [ProductID]) AS [Table])

Thanks!

You can try this:
... <Model> NATURAL PREDICTION JOIN
SHAPE {
OPENQUERY([DS], 'SELECT ''A'' AS CompanyName')
} APPEND
( {
Openquery([ds], 'SELECT DISTINCT [CompanyName], [PurchasedProductID] FROM [Table] WHERE [CompanyName] = ''a'' ')
} RELATE [CompanyName] TO [CompanyName]
) AS [Table]
AS T

Note the "fake" top level row (the first query) which just serves as foreign key to group the entries in the nested (APPEND) statement|||wow! It works! Thanks so much!

Saturday, February 25, 2012

Queue Reader Agent failed

Hi ,
The Queue Reader Agent for my Replication has failed but i am not able to
see the error as there's no Error History details.
1) What does this agent do ?
2) what might cost it to fail ?
It caused the replication to faile but once i start the agent the
replication continues
kindly advise
tks & rdgsThe Queued Reader Agent is used with queued updating (adv feature) with
snapshot and transactional replication.
From the SQL BOL:
Queued updating allows snapshot replication and transactional replication
Subscribers to modify published data without requiring a continuous
connection to the Publisher.
When you create a publication with the queued updating option enabled and a
Subscriber that is enabled for queued updating performs inserts, updates, or
deletes on published data, the changes are stored in a queue. The queued
transactions are applied asynchronously at the Publisher when network
connectivity is restored.
The agent should show up under Agent under Replication in the treeview in
EM. Right-click on the agent in the details pane for history/errors. Also
check the SQL Server and SQL Server Agent error logs for possible errors.
You might also right-click the job associated with the agent in EM for more
details.
HTH
Jerry
"maxzsim" <maxzsim@.discussions.microsoft.com> wrote in message
news:C8923B13-FDD3-4E66-A628-3236EE80021D@.microsoft.com...
> Hi ,
> The Queue Reader Agent for my Replication has failed but i am not able to
> see the error as there's no Error History details.
> 1) What does this agent do ?
> 2) what might cost it to fail ?
> It caused the replication to faile but once i start the agent the
> replication continues
> kindly advise
> tks & rdgs

Queue Reader Agent failed

Hi ,
The Queue Reader Agent for my Replication has failed but i am not able to
see the error as there's no Error History details.
1) What does this agent do ?
2) what might cost it to fail ?
It caused the replication to faile but once i start the agent the
replication continues
kindly advise
tks & rdgsThe Queued Reader Agent is used with queued updating (adv feature) with
snapshot and transactional replication.
From the SQL BOL:
Queued updating allows snapshot replication and transactional replication
Subscribers to modify published data without requiring a continuous
connection to the Publisher.
When you create a publication with the queued updating option enabled and a
Subscriber that is enabled for queued updating performs inserts, updates, or
deletes on published data, the changes are stored in a queue. The queued
transactions are applied asynchronously at the Publisher when network
connectivity is restored.
The agent should show up under Agent under Replication in the treeview in
EM. Right-click on the agent in the details pane for history/errors. Also
check the SQL Server and SQL Server Agent error logs for possible errors.
You might also right-click the job associated with the agent in EM for more
details.
HTH
Jerry
"maxzsim" <maxzsim@.discussions.microsoft.com> wrote in message
news:C8923B13-FDD3-4E66-A628-3236EE80021D@.microsoft.com...
> Hi ,
> The Queue Reader Agent for my Replication has failed but i am not able to
> see the error as there's no Error History details.
> 1) What does this agent do ?
> 2) what might cost it to fail ?
> It caused the replication to faile but once i start the agent the
> replication continues
> kindly advise
> tks & rdgs

Queue Reader Agent failed

Hi ,
The Queue Reader Agent for my Replication has failed but i am not able to
see the error as there's no Error History details.
1) What does this agent do ?
2) what might cost it to fail ?
It caused the replication to faile but once i start the agent the
replication continues
kindly advise
tks & rdgs
The Queued Reader Agent is used with queued updating (adv feature) with
snapshot and transactional replication.
From the SQL BOL:
Queued updating allows snapshot replication and transactional replication
Subscribers to modify published data without requiring a continuous
connection to the Publisher.
When you create a publication with the queued updating option enabled and a
Subscriber that is enabled for queued updating performs inserts, updates, or
deletes on published data, the changes are stored in a queue. The queued
transactions are applied asynchronously at the Publisher when network
connectivity is restored.
The agent should show up under Agent under Replication in the treeview in
EM. Right-click on the agent in the details pane for history/errors. Also
check the SQL Server and SQL Server Agent error logs for possible errors.
You might also right-click the job associated with the agent in EM for more
details.
HTH
Jerry
"maxzsim" <maxzsim@.discussions.microsoft.com> wrote in message
news:C8923B13-FDD3-4E66-A628-3236EE80021D@.microsoft.com...
> Hi ,
> The Queue Reader Agent for my Replication has failed but i am not able to
> see the error as there's no Error History details.
> 1) What does this agent do ?
> 2) what might cost it to fail ?
> It caused the replication to faile but once i start the agent the
> replication continues
> kindly advise
> tks & rdgs