How To: Set Up && Interpret A Model To Predict Even Dollar Transactions

Feb 12, 2007

Generally, what would be a good start to model and make predictions based on the following.

Even Dollar Transactions €“ Including transactions that end in $0 or $50 with a Total Transaction Amount between $400 and $5000.

I have a table called Transaction with a BillingAmount column.

I've gone through the SQL Server 2005 Data Mining Tutorial (which uses a discrete prediction BikeBuyer yes or no) and read a lot of Data Mining with SQL Server 2005. Neither of these give good, complete, methodical examples of selecting inputs and targets and making predictions; especially for continuous columns.

I think I'm generally struggling with the concepts of selecting (continuous?) predictable attributes and calculating predictions based on the results. Are there any examples of a scenario similar to the above that I can reference? or just some advise.

View 6 Replies


ADVERTISEMENT

How To Interpret The Value Returned By Permissions()?

Dec 30, 2003

I'm trying to check whether a user has permission to execute some master system stored procedures. For example, select permissions(OBJECT_ID('xp_loginconfig')) returns 2097215.

I have converted the decimal 2097215 to binary 00000000 00100000 00000000 00111111. I guess I suppose to look at the lower 16 bits only. Then I convert the binary 00000000 00111111 back to decimal 63. Then I find the largest decimal that is <= 63 in the table (the one in BOL) which shows the bits used for object permissions that are returned when only objectid is specified. Subtract that number from 63 and repeat this process until the difference is 0. So, in this case, 63 - 32 -16 -8 -4 -2 -1 = 0. This should the user has all the corresponding statement permissions. The upper 16 bits 00000000 00100000 are used to check what can be granted to other users. Since they are = 32 which is corresponding to execute, I believe that user can grant execute permission to other users.

For example, to check for execute procedure permission, it seems that I can use either of the following statement:

if permissions(OBJECT_ID('xp_loginconfig')) & 32 = 32

if permissions(OBJECT_ID('xp_loginconfig')) & 0x20 = 0x20


I hope someone can confirm my understanding. Is there another way to check for permission? Also, my understanding is that I must use master before executing permissions() since I'm checking permissions for master stored procedures.


Thank you for any help,

Peter

View 2 Replies View Related

How Would You Interpret This Error Message

Dec 4, 2006

I am attempting to complete a package that calls four "worker" packages in parallel.The connections are part of the worker packages.When I start the calling package, I get a message:Error at XYZ (the name of one of the packages): The connection is not specified.Which connection? Each worker package has three connections.So just to experiment, I delete that Execute Package Task and I get that same message about another package.So why does it not identify which connection is the concern and why did it stop with the first one instead of listing all the connection issues?And why is it asking for a connection at all? At present, all it does is call the other packages.

Still hanging in there...
IanO

View 5 Replies View Related

How To Predict?

Mar 30, 2007

I have a question.The question is to predict what to do next.



I have a table with three columns.

CustomerID ServiceContent ServicesID

140105100001 Service1 1

140105100001 Service2 1

140105100001 Service3 1

140105100001 Service1 2

140105100001 Service5 2

... ... ...





I want to use SQL Server 2005 Data Mining to predict what services that one customer will accept next.





Thanks

View 4 Replies View Related

Report Model Deployment : The Model ID Of The Submitted Model Must Match That Of The

Dec 5, 2005

Running 2005 Beta 3 Refresh.  When I first deploy, it works fine. Subsequent deployments yield the following error:

View 9 Replies View Related

Predict Product With Sex And Age Of Customer.

Sep 17, 2006

i have table:

customer(customerid, age,sex....)

orderdata(orderid, customerid,day)

orderdetails(orderid, productid, quantity)

products(productid, productname,...)

now, i want to show some product for customer when i now him age and sex.

e.ct: if he is a man and age =20 i show product : ball, pull, sport close....... if man is a woman , i show lips, babara, t_shirt, skirt....

if man is a chirdren, i will show joy, story for chidren....

how i create my mining model. and how i query for result in DTS

View 1 Replies View Related

Predict Probability In Decision Trees

Dec 13, 2006

Hello,

I installed the bike buyer example and i am learning the DMX language. Now i wrote the following query (using MS decision trees):

SELECT
T.[Last Name],
[Bike Buyer],
PredictProbability(Predict([Bike Buyer])) AS [Probability]
From
[v Target Mail]
PREDICTION JOIN
OPENQUERY
(....... And so on..)

Now the result is surprising to me. In the resulttabel all the probabilities are equal.

Bike Buyer Probability
1 0.99994590500919611
0 0.99994590500919611
0 0.99994590500919611
0 0.99994590500919611
0 0.99994590500919611
1 0.99994590500919611

and so on.

Now i am wondering what predictProbability means. I thought that PredictProbability meant the probability that the prediction is correct. Now all the probabilities are the same and the input is different. Can somebody tell me what PredictProbability means or am I using it wrong?

Thanx in advance,

Joris Valkonet

View 6 Replies View Related

Data Mining Problem: Is That Possible To Predict Many Many Columns?

Mar 22, 2007

Hello,

Can someone please assist?
I have no problem using the provided Algorithms (NaiveBayes, Decision Tree, etc) from SQL Server 2005 Data Mining. For example: If I want to predict whether the customers want to buy bike from the following data, then I use Age, Salary, Gender as input/attribute/feature selection and BuyBike column as "Predict" column.

Table
Age Salary Gender BuyBike
------------------------------------

However, say that I have 10,000 types of bikes to predict. How to do that?
Age Salary Gender BuyBike1 BuyBike2 BuyBike3 ...... BuyBike10000
------------------------------------------------------------------------------------

Are there any online resources discussing this issue? I am desperately try to solve this problem. Please assist!



Mary

View 5 Replies View Related

Predict Products ( Data Mining 2000)

Oct 6, 2006

i want to make a web page and when somebody come in. i want show for him which products that everyone often buy at that time ( month or summer ).

how i do in data mining to predict that products ?

more: i want know how much percent of product is like by buyer

or i want show products with desc % of the like of people

View 4 Replies View Related

Dollar Sign Is Not A Valid Name ?

Nov 30, 2006

Code:


objrs.Open "Select * from [klcc_f$]", objConn, adOpenStatic



why IM getting dollar sign is not a valid name ?

View 2 Replies View Related

Add Dollar To The Result Of Floor Value

Oct 6, 2014

I am using this query to get the nearest value and rounding it.

floor(Price*DollarPrice) as Dollars

This returns result like below

31
34
567

Now I just need to add dollar symbol before the result.

View 1 Replies View Related

How To Put Dollar Sign With Numbers

Apr 14, 2015

I have a query where I have to use the convert function to return the unitprice as a decimal with 2 digits to the right of the decimal and a $ to the left of the number like 10 should be $10.0o. How do i insert the $. this is my code so far:

SELECT CONVERT(varchar, UnitPrice, 1) AS varchartotal
FROM dbo.[Order Details]

View 2 Replies View Related

Right Align Dollar Signs

Jun 4, 2007

Hello Everyone,




Does anyone know where I can go to get the format to make

$ right align + =Sum(Fields!Blah.Blah) as #,###.00?



|------------------------------|

|$ 23.00|

|$ 1,000.00|

|------------------------------|



I can not figure out how to get the dollars to right align like Excel ?



Please point me to the answer or a previous post that answers this...



View 4 Replies View Related

T-SQL (SS2K8) :: Query To Predict Future Job Schedules From MSDB Tables

May 8, 2014

I want to query my msdb job and jobschedule related tables to generate a list of runtimes for each of these jobs for the next day or any future date. This query should output JobID, Run_Date(YYYYMMDD), and Run_Time(HHMMSS).

If I have 3 jobs with...

Job#1 scheduled to run once every 4 hours between 6 AM and 10 PM
Job# 2 scheduled to run every 15 minutes between 11 AM and 1 PM
Job# 3 scheduled to run every minute between 4 PM and 4:15 PM

my output should look as below ....

View 1 Replies View Related

Adding Columns For A Dollar Total

Jun 17, 2008

I was wondering what is the best way to have a amount paid total from amounts entered to a specific id or column?  I am using SQL 2005.  I need to be able to tally the total amount paid and put that value in another column called amount paid. Any help would be great.
Thanks,

View 9 Replies View Related

Formatting A Column Display With Dollar Sign

Feb 24, 2014

How to implement the display of a dollar sign for an output in a query...

View 5 Replies View Related

How Do I Format The Data As A Dollar Symbol With 2 Decimals

Oct 4, 2007



Hi,

I want to display data that is 10 as $10.00 or 10.1 as $10.10..

and i tried giving this expression


=IIf(Fields!Nav.Value = "n/a","n/a",(cstr(Format(Fields!Nav.Value,"C2"))))

But when i run the report its giving it as C2 and not $10.00 or whatever it should be.

any help will be appreciated.
Regards
Karen

View 3 Replies View Related

Count Number Of Positive Dollar Values In Query?

Feb 3, 2012

How do I count the number of positive dollar values in a query? I have various negative and positive dollar values and want to count how many positive I have then I will know how many are negative. I cannot put >0 or >0.00 in the where because it still returns everything cuz the programmer set the datatype to be money

View 4 Replies View Related

Give The Dollar Or Euro Symbol For Amount Field

Apr 9, 2008

Hai

I have amount field in my table as decimal. I need a query to display the amount with dollar or euro symbol based on country selection. The country also in same table.

For example If country is US then Amount $1200, If country is UK then Amount €1200.

Thanks in advance.

View 10 Replies View Related

TSQL UNION, But Get The Differance In Dollar Amount In The Result

May 26, 2006

GridView_1
Category Name SubCategory Name Amount
Construction Construction 2,877.00
Design Design 0.00
Soft Cost Inspection 0.00

GridView_2
Category Name SubCategory Name Amount
Construction Construction 2,800.00
Construction Contingency 300.00
Design Design 500.00
Soft Cost Inspection 980.00
Soft Cost Survey 145.00
Soft Cost Testing 720.00
Soft Cost Management 1000.00
Soft Cost Other Costs 10,000.00

QUESTION:
How could I UNION the two result sets together and where the Category Name and SubCategory Name are equal for GridView1 and GridView2, show the difference in the Amount column.

This is the result I am looking for.


Category Name SubCategory Name DIFFERANCE
Construction Construction 77.00 = (GridView1 - GridView2)
Construction Contingency 300.00
Design Design 500.00
Soft Cost Inspection 980.00
Soft Cost Survey 145.00
Soft Cost Testing 720.00
Soft Cost Management 1000.00
Soft Cost Other Costs 10,000.00

I am trying to do it on the back end. Though, if you have a clever way to produce a resulting gridview in C# with the results I need, I am all game!
This is what I have so far: (TSQL code)



SELECT

tblCategories.txtCategoryName,

tblSubCategories.txtSubCategoryName,

tblEstimatesLineItems.curEscAmount

FROM

tblEstimatesLineItems, tblCategories, tblSubCategories

WHERE

tblEstimatesLineItems.lngzEstimateId = 24 AND --@lngzEstimateId_Compare1

tblEstimatesLineItems.lngzCategoryId = tblCategories.idsCategoryId AND

tblEstimatesLineitems.lngzSubCategoryId = tblSubCategories.idsSubCategoryId

union all

SELECT

tblCategories.txtCategoryName,

tblSubCategories.txtSubCategoryName,

tblEstimatesLineItems.curEscAmount

FROM

tblEstimatesLineItems, tblCategories, tblSubCategories

WHERE

tblEstimatesLineItems.lngzEstimateId = 25 AND --@lngzEstimateId_Compare1

tblEstimatesLineItems.lngzCategoryId = tblCategories.idsCategoryId AND

tblEstimatesLineitems.lngzSubCategoryId = tblSubCategories.idsSubCategoryId

View 7 Replies View Related

[SQL Server 2000] How To Interpret Server Trace / How To Get More Details?

Apr 4, 2007

Hello all,

An application that i wrote (that interacts with SQL Server 2000) is causing deadlocks on the server. i have no direct access to the server, but the user have sent me a server trace.

The relevant part of the trace is:




Code Snippet



2007-04-04 11:29:13.01 spid4 End deadlock search 296 ... a deadlock was found.
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Victim Resource Owner:
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) Value:0xa
2007-04-04 11:29:13.01 spid4 Requested By:
2007-04-04 11:29:13.01 spid4 Input Buf: RPC Event: sp_execute;1
2007-04-04 11:29:13.01 spid4 SPID: 116 ECID: 0 Statement Type: UPDATE Line #: 1
2007-04-04 11:29:13.01 spid4 Owner:0x8849cba0 Mode: X Flg:0x0 Ref:2 Life:02000000 SPID:116 ECID:0
2007-04-04 11:29:13.01 spid4 Grant List 0::
2007-04-04 11:29:13.01 spid4 PAG: 12:1:42176 CleanCnt:2 Mode: X Flags: 0x2
2007-04-04 11:29:13.01 spid4 Node:2
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Requested By:
2007-04-04 11:29:13.01 spid4 Input Buf: RPC Event: sp_execute;1
2007-04-04 11:29:13.01 spid4 SPID: 122 ECID: 0 Statement Type: INSERT Line #: 1
2007-04-04 11:29:13.01 spid4 Owner:0x800936e0 Mode: IX Flg:0x0 Ref:0 Life:02000000 SPID:122 ECID:0
2007-04-04 11:29:13.01 spid4 Grant List 2::
2007-04-04 11:29:13.01 spid4 PAG: 12:1:42157 CleanCnt:2 Mode: IX Flags: 0x0
2007-04-04 11:29:13.01 spid4 Node:1
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Wait-for graph
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ...
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Cycle: ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Node:2 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) V
2007-04-04 11:29:13.01 spid4 Node:1 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Deadlock cycle was encountered .... verifying cycle
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Cycle: ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Node:2 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) V
2007-04-04 11:29:13.01 spid4 Node:1 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Target Resource Owner:
2007-04-04 11:29:13.01 spid4 Starting deadlock search 296



Having very little experience with SQL Server 2000, all that i learn from the trace is that, well, there is a deadlock, but i had already known that beforehand.

What other useful details can be interpreted from the trace above?
How can i obtain information like the specific statement(s) which cause the deadlock, etc?



Thanks in Advance,
Edwin

View 1 Replies View Related

Changing Connection Transactions To Database Transactions

May 22, 2005

Hi there,
I have decided to move all my transaction handling from asp.net to stored procedures in a SQL Server 2000 database. I know the database is capable of rolling back the transactions just like myTransaction.Rollback() in asp.net. But what about exceptions? In asp.net, I am used to doing the following:
<code>Try   'execute commands   myTransaction.Commit()Catch ex As Exception   Response.Write(ex.Message)   myTransaction.Rollback()End Try</code>Will the database inform me of any exceptions (and their messages)? Do I need to put anything explicit in my stored procedure other than rollback transaction?
Any help is greatly appreciated

View 3 Replies View Related

Case Statement - Count Orders That Fall Into Specific Dollar Buckets

Aug 2, 2013

I have a table of orders. I was asked to count the orders that fall into specific dollar buckets. Normally I would use a CASE statement for this, but in this case, there are over 100 different buckets!

For example, I need to count the orders in $5 increments up to $400. The CASE statement would look like this:

Code:
CASE
WHEN sum(revenue) BETWEEN 0.01 AND 5.00 THEN [0.01 to 5.00]
WHEN sum(revenue) BETWEEN 5.01 AND 10.00 THEN [5.01 to 10.00]
...
WHEN sum(revenue) BETWEEN 395.01 AND 400.00 THEN [395.01 to 400.00]

Is there an easier way to do this, maybe with a loop?

View 11 Replies View Related

Dollar Amount - Error Converting Data Type Varchar To Numeric

Aug 6, 2014

I am trying to add a field (bank_chk_amt] from a table in to my query to bring in a dollar amount....I originally had this below

SELECT dbo.CBPAYMENT.REFERENCE_NO, 'CCMCCHBREF' AS Literal, RTrim([description]) + ', ' + [bank_chk_amt] + ', ' + convert(char(10),[check_date],101) + ', ' + 'Refund check sent to ' + [payee_name] AS [Free Text]
FROM dbo.CBPAYMENT;

but I would get "Error converting data type varchar to numeric".So my co-worker modified it and added (str([bank_chk_amt]) to my query which worked, but I noticed it dropped of the cents. So instead of 80.35 it would show 80 And I noticed it rounded 100.50 to 101...How can I bring in the full dollar amount and without adding?

View 2 Replies View Related

Power Pivot :: Building A Model Based On Multinational Model With Different Languages?

Oct 19, 2015

I need to develop a language specific dwh, meaning that descriptions of products are available from a SAP system in multiple languages. English is the most important language and that is the standard. But, there are also requirements of countries that wants productdescriptions in their language. 

Productnr Productdesc Language
1            product       EN
1            produkt       DE

One option is to column the descriptions, but that is not very elegantly. I was thinking of using bridge tables to model this but you have to always select a language in a filter (I think)..

I'm thinking of a technical solution, such that when a user logs on, the language is determined and a view determines whether to pick a certain product table specific for a certain language. But then I don't have the opportunity to interchange the different language specific fields in a report (or in my case PowerPivot).

View 2 Replies View Related

Can We Pause Log Shipping, Bring Primary Db To Simple Recovery Model And Then Back To Full R Model?

Apr 25, 2008



We have the following scenario,

We have our Production server having database on which Few DTS packages execute every night. Most of them have Bulk Insert stored procedures running.

SO we have to set Recovery Model of the database to simple for that period of time, otherwise it will blow up our logs.

Is there any way we can set up log shipping between our production and standby server, but pause it for some time, set recovery model of primary db to simple, execute DTS Bulk Insert Jobs, Bring it Back to Full recovery Model AND finally bring back Log SHipping.

It it possible, if yes how can we achieve this.

If not what could be another DR solution in this scenario.

Thanks Much
Tejinder

View 6 Replies View Related

Predict Query Gives 'DMPluginWrapper; Object Reference Not Set To An Instance Of An Object' Error

Mar 17, 2008



Hi,

I am trying to develop a custom algorithm. I have implemented and tested training methods, however I fail at prediction phase. When I try to run a prediction query against a model created with my algorithm I get:


Executing the query ...
Obtained object of type: Microsoft.AnalysisServices.AdomdClient.AdomdDataReader
COM error: COM error: DMPluginWrapper; Object reference not set to an instance of an object..
Execution complete


I know this is not very descriptive, but I have seen that algorith doesn't even executes my Predict(..) function (I can test this by logging to a text file)
So the problem is this, when I run prediction query DMPluginWrapper gives exception -I think- even before calling my custom method.

As I said it is not a very descriptive message but I hope I have hit a general issue.

Thanks...

View 3 Replies View Related

MS Time Series - Quick To Process The Model But Takes Very Long Time To Open Mining Model Viewer

Oct 27, 2007

Hi all,

I have MS Time Seeries model using a database of over a thousand products each of which has hundreds of cases. It amazingly takes only a few minutes to finish processing the model, but when I click Mining Model Viewer to view the models, it takes many hours to show up. Once the window is open, I can choose model for different products almost instantly. Is this normal?

View 1 Replies View Related

Connected Model Vs. Disconnected Model

Aug 10, 2005

hi !!i have a question about the connected and disconnected model to access the Sql server DB.......i know that there is better to choose one rather than the other in some situantions and there is no better model in all cases...... os i hope you can help me to decide what shall i choose...i will use the DB to connect to Web services and read data from the DB and wrtie some data back.......i do not know that to use ..... i hope you advise me and tell me about the rules that will allow me to choose  what model to choose .... i appreciate your help!!Thanks !!!

View 2 Replies View Related

Data Mining :: MS Excel Data Mining Add-ins / Maximum Number Of Predict Columns

Jun 4, 2015

Having successfully created :

- a data mining structure with about 80 columns.
- a data mining model using Microsoft_Decision_Trees with 2 prediction columns. 

I thought I would then explore the possibility of have more than 2 prediction columns, in this case 20.

I get an error message and I can't work out :
a) if this is because there's a limit to the maximum number of prediction columns and where that maximum is stated.
b) if something else has become corrupted
c) there's a know bug and if the error message is either meaningful or not.

Either way, I'm unable to complete the data mining wizard 

The error message is :Errors in the metadata manager. Either the mining structure with the ID of '[my model Structure]' does not exist in the database with the ID of 'DMAddinsDB', or the user does not have permissions to access the object.

View 3 Replies View Related

Error While Trying To Load The Mining Model In The Mining Model Viewer

Nov 15, 2006

I get the following error when I try to load the mining model in the mining model viewer

Query (1, 6) The '[System].[Microsoft].[AnalysisServices].[System].[DataMining].[NeuralNet].[GetAttributeValues]' function does not exist.

I get a similar error when I try to load the Load Mining Accuracy Chart

Failed to execute the query due to the following error:

Query (1, 6) The '[System].[Microsoft].[AnalysisServices].[System].[DataMining].[AllOther].[GenerateLiftTableUsingDatasource]' function does not exist.

I have OWC 11 installed. What am I missing here?

Thanks

View 7 Replies View Related

Transactions

Aug 13, 2003

Hi All,
Can anybody suggest me a website where I can find articles on Managing transactions with Sql server. Also a scenario where the transactions take place in a environment involving 2 different databases, Like the bank account and credit card transactions (specifically of 2 way kind)
Thanks

View 5 Replies View Related

Transactions

Apr 6, 2005

I have a web application with a shopping cart, how do I stop all the shopping cart transaction from going into the db log? Is this possible?  These are are only transient data movements, and will never be need to to restore to, and they are cause log bloat. Or is there a better way to stop log bloat?
 
Thanks

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved