Sproc Idea: How Sensitive Is A Neural Net To Each Input?

Jun 15, 2007

Wanted some candid feedback on this idea. Everyone knows that neural nets are a black box in terms of the weights and such it uses. The best you can do is to get an idea how "sensitive" the NN is to each input. I don't know of any example code that's out there to help you do this in an automated manner (correct me if I'm wrong) so I'm thinking about writing a sproc that would help with this task.



Basically, the sproc would take in the mining model's name and the key of one case. Let's say the case and its attributes are:



ZipCode=93901 (the case key)

MedianIncome=99,098

PopulationDensity=1234

AvgTemperature=74.3

Predict likelihood to respond to an offer



For that case, it would go through an iteration per input. First it would test the first input, MedianIncome. It would run 100 predictions using the input values listed above. All the inputs would remain the same throughout except for MedianIncome where it would try out the complete range of that input. Based upon how much the prediction changes, you would have an idea how sensitive the model is to MedianIncome. Then it would move on to the next input and do the same.



When it's done testing each input, it could spit out a dataset listing all the inputs in order of how sensitive the model is to them and a few other stats like min and max prediction.



Thoughts? Improvements? Alternatives?

View 6 Replies


ADVERTISEMENT

Neural Network Input: -1 To 1?

Jun 10, 2007

General data mining books talk about NN taking inputs which are between -1 and 1. Even Jamie's book says that's what it generally receives. I don't think this is a requirement for the Microsoft algorithm, but I wanted to ask if it was a best practice. If you're feeding it something like home values where 99% of homes are under $1 million you can use some normalization trick so that mansions don't skew the data. But if your data doesn't need such normalization, is there any need to normalize it to the -1 to 1 range?



Also, is the Microsoft algorithm sensitive to the relative size of different inputs? For instance, if InputA is home size (500-50,000 square feet) and InputB is months unoccupied (0-24 months), does that cause the Microsoft NN to weigh home size more heavily?

View 1 Replies View Related

Any Idea What The Purpose Of This SPROC Might Be? (no Prizes, Sorry!)

Jan 19, 2007

I've been asked to document an application and I'm going through allthe Stored Procedures and trying to work out what they're supposed todo.Can anyone give me an idea of what the Stored ProcedurewsBookingListsGetAll below is trying to achieve? Is it incomplete? Ican't see any reason to pass in the Parameter, and what is the UNIONSELECT 0 all about?Many thanksEdwardCREATE Procedure wsBookingListsGetAll@DebtorIDvarchar(15)Asset nocount onSELECTfldBookingListIDFROMtblWsBookingListUNIONSELECT 0returnGO/* Table def */if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[tblWSBookingList]') and OBJECTPROPERTY(id,N'IsUserTable') = 1)drop table [dbo].[tblWSBookingList]GOCREATE TABLE [dbo].[tblWSBookingList] ([fldDebtorID] [char] (15) COLLATE Latin1_General_CI_AS NOT NULL ,[fldBookingName] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL,[fldAddressCode] [char] (15) COLLATE Latin1_General_CI_AS NOT NULL ,[fldEmail] [varchar] (250) COLLATE Latin1_General_CI_AS NOT NULL ,[fldFirstName] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL ,[fldLastName] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL ,[fldBookingListID] [int] IDENTITY (1, 1) NOT NULL ,[fldInvoiceNumber] [varchar] (15) COLLATE Latin1_General_CI_AS NULL ,[fldPayeeID] [char] (15) COLLATE Latin1_General_CI_AS NULL) ON [PRIMARY]GO

View 1 Replies View Related

SQL Server Case Sensitive Sproc

Mar 5, 2007

I have a Users table with UserName and Password columns, in SQL Server 2005. 
Currently the SQL Server is not set up to use case-sensitive criteria in the sprocs.  How can I write my sproc to be case sensitive when searching on username and password?

View 1 Replies View Related

SPROC Output Paramater Asking For Input?

Jan 3, 2008

I am trying to get a stored proceedure to return the autogenerated numerical primary key of the last row created to our appliciation. I have created what I thought was an output parameter to handle this however when the application runs I get a message that seems to indicate that it is ASKING for the parameter instead of returning it. Here is the code of the sproc:




Code Block
USE [chronicle]
GO
/****** Object: StoredProcedure [dbo].[CreateNewLicense] Script Date: 01/03/2008 06:35:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CreateNewLicense]

@VendorId int,
@PoId int,
@LicenseTypeId int,
@LicenseUserId int,
@LocationId int,
@LicenseStartDate smalldatetime,
@DaysAllowed int,
@SerialNum varchar(50),
@ActivationKey varchar(50),
@MaxUsers int,
@Comments varchar(1000),
@LicenseId int OUTPUT
AS
BEGIN
INSERT INTO license
(vendor_id,
po_id,
license_type_id,
lic_user_id,
location_id,
lic_start_date,
days_allowed,
serial_num,
activation_key,
max_users,
comments
)
VALUES
( @VendorId,
@PoId,
@LicenseTypeId,
@LicenseUserId,
@LocationId,
@LicenseStartDate,
@DaysAllowed,
@SerialNum,
@ActivationKey,
@MaxUsers,
@Comments
)
SELECT @LicenseId = @@IDENTITY
END





View 5 Replies View Related

SQLDataSource Cntrl - FormView Cntrl - UPD Sproc And Sproc Debugger. I Dare Anyone To Figure This One Out.

Feb 13, 2007

I have attached the results of checking an Update sproc in the Sql database, within VSS, for a misbehaving SqlDataSource control in an asp.net web application, that keeps telling me that I have too many aurguments in my sproc compared to what's defined for parameters in my SQLdatasource control.....
No rows affected.
(0 row(s) returned)
No rows affected.
(0 row(s) returned)
Running [dbo].[sp_UPD_MESample_ACT_Formdata]
( @ME_Rev_Nbr = 570858
, @A1 = No
, @A2 = No
, @A5 = NA
, @A6 = NA
, @A7 = NA
, @SectionA_Comments = none
, @B1 = No
, @B2 = Yes
, @B3 = NA
, @B4 = NA
, @B5 = Yes
, @B6 = No
, @B7 = Yes
, @SectionB_Comments = none
, @EI_1 = N/A
, @EI_2 = N/A
, @UI_1 = N/A
, @UI_2 = N/A
, @HH_1 = N/A
, @HH_2 = N/A
, @SHEL_1 = 363-030
, @SHEL_2 = N/A
, @SUA_1 = N/A, @SUA_2 = N/A
, @Cert_Period = 10/1/06 - 12/31/06
, @CR_Rev_Completed = Y ).
 
No rows affected.
(0 row(s) returned)
@RETURN_VALUE = 0
Finished running [dbo].[sp_UPD_MESample_ACT_Formdata].
The program 'SQL Debugger: T-SQL' has exited with code 0 (0x0).
And yet every time I try to update the record in the formview online... I get
Procedure or function sp_UPD_MESample_ACT_Formdata has too many arguments specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Procedure or function sp_UPD_MESample_ACT_Formdata has too many arguments specified.Source Error:




An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I have gone through the page code with a fine tooth comb as well as the sproc itself. I have tried everything I can think of, including creating a new page and resetting the fields, in case something got broken that I can't see.
Does anyone have any tips or tricks or info that might help me?
 
Thanks,
SMA49

View 3 Replies View Related

Neural Net Algorithm

Sep 15, 2006

Hi,

Would anyone be able to provide a reference paper on the neural net algorithm implemented in SQL Server 2005 to better understand how it works?

Thanxs for any info.

View 3 Replies View Related

Training A Neural Network

Aug 10, 2006

I have two problems while trying to train a neural network.
My network have 10 continuous input ad 1 discrete output (3 states)

The parameters I chose are :
-Hidden node ratio 10
-Holdout percentage 10

The others are default.

First,when i train it thanks to BI dev studio, the training is very fast (less than 5 seconds) and the results compared with the training set are bad (at least 30% of errors). Is there a way to improve the training (I don't care about the time required to train if it works)?

Second, I decided to train the network using SQL server management studio and I get this error which I can't understand : "Les connexions ad hoc telles que spécifiées dans des clauses OPENROWSET ne peuvent pas être utilisées sur ce serveur". Translated it may be something like "this server can't use ad hoc connections such as specified in OPENROWSET".

My query is :

INSERT INTO MINING model [Associations Learn2]([From Requete1],[From Requete2],
[Keywords1],[Keywords2],[Nb Apparition1],[Nb Apparition2],[Nombre Requete Distincte],[Probabilite],[Titre1],[Titre2],[Type],[Uid])
OPENROWSET
('SQLNCLI.1','Data Source=STAG-XP-EDITION;user=sa;password=***;Initial Catalog=OpenFind_StockagePreNeurone',
'SELECT [From Requete1],[From Requete2],
[Keywords1],[Keywords2],[Nb Apparition1],[Nb Apparition2],[Nombre Requete Distincte],
[Probabilite],[Titre1],[Titre2],[Type],[Uid] FROM associationsLearn2'
)

Could someone explain me the error?

View 1 Replies View Related

Question About Neural Networks

Feb 6, 2007

I created a test table (name - "Nset") with the columns:
id (int), n1 (float), n2 (float), n3 (float) and c1 (varchar).
Then filled a table the followings information:
id n1 n2 n3 c1

1 0,1 0,1 0,6 one

2 0,2 0,1 0,5 one

3 0,7 0,5 0,1 two

4 0,4 0,9 0,3 two

5 0,5 0,1 0,5 three

And created a neural network with tuning by default. "id"-field is the key. n1, n2 and n3 are inputs. c1 - predict.

Then i tryed predict query, like:

SELECT

PREDICT([Nset].[c1])

FROM

[Nset]

NATURAL PREDICTION JOIN

(SELECT 0,5 AS [n1], 0,1 AS [n2], 0,5 AS [n3]) AS t

The result is "three". This is correct. And some other tests appeared correct.

But, when I filled the column c1 with numerical values (one = 1, two=2, three=3) and changed type to int, a predict query left off to work correctly.

Previous query return 4.

And other tests showed that a value returned large on unit.

Is this correct?

Thanks.

View 8 Replies View Related

Neural Network Problem

Jun 9, 2006

Hello , using MS Visual studio 2005 , I deployed sql table with NN algorithm , it successfuly deployed . But when I tabbed to "Mining Model Viewer" it gave me the following error :



The following system error occurred: Invalid procedure call or argument.
Execution of the managed stored procedure GetAttributeScores failed with the following error: Exception has been thrown by the target of an invocation.Microsoft::AnalysisServices::AdomdServer::AdomdException.

what can I do ?



View 1 Replies View Related

Microsoft Neural Network, How Do I Feed It ?

Aug 1, 2006

Hello there,

I'm working with Analysis sevices 2005 developer edition. Looking through the documentation i becomes apperent that the NN algorithm takes 255 input attributes by default. This can be changed to any integer value, OK....

My problem is that I want to feed the network with 40000 input variables. In order to do so, I will have to do a select:

SELECT fld1, fld2, ...... fld39999, fld40000

FROM tblSometable



However, this is not possible, as the books online describes it is only possible to return 4096 columns from a select statement.

Question : How do I populate a NN in AS2005, with nmore than 4096 inputs ?!



View 3 Replies View Related

Microsoft Neural Networks Question

Jan 17, 2007



1) Scaling of Inputs

Is the standarization of the inputs done automatically when running the Microsoft Neural Network algorithm or I should be transforming the variables before running the algorithm?

2) Predicted Probabilities

How do I create a table with the actual predicted probabilities of the model for each observation? In the Mining Model Prediction tab the output would be either 0 or 1, my question is how can I obtain the actual value of the estimated probability?



View 4 Replies View Related

Error With Neural Network Viewer

Aug 2, 2007

I have read the threads regarding the Neural Network Viewer and I think I have a similar problem. I do have Service Pack 2 installed and I'm running the x64 version of SQL 2005.

I'm building a model from a single relational CASE table. Granted the table has many columns summarized at the customer level but there are it is well formed and has no NULL values (plenty of zero or blank values though). The only time I can get the NN Viewer to work is when I accept the attribute recommendations. It seems once I stray from these recommendation, even if there is still correlation with an attribute, I cannot view the model using the NN Viewer. My latest error message says:

"The provider could not determine the String value. For example, the row was just created, the default for the String column was not available, and the consumer had not yet set a new String value."

I get this message even when all input attributes are Continuous so I'm not sure what String column it is referring to.

Any help is greatly appreciated. I'm in a time crunch and I have sold the client on SQL Server 2005 capabilities. It's a bit embarrasing if I can't get this resolved.

-- Steve

P.S.: I don't recall having any issues with the NN Viewer prior to Service Pack 2 (although others have). Have you done regression testing to test this issue?

View 3 Replies View Related

Negative Output From Neural Networks

Jun 29, 2006

I am getting negative predictions (continuous) from a neural network model that has been trained on data that only contains positive values or zeros (no nulls).

Is there a setting that can limit the lower end of the output range to zero?

View 1 Replies View Related

Setting Parameters For Neural Networks

Jun 13, 2007

I am trying to get familiar with Microsoft neural networks to predict property prices. The results are better but I wanted to amend the default parameters passed to the neural network.

So on MINING MODEL TAB when I right click and go into SET ALGORITHM PARAMETERS, I can't see any parameters there, if I try to enter a parameter for example MAXIMUM_STATES and process the model I get the following error message

"The 'maximum_states' data mining parameter is not valid for the 'My Model' model"

I also added a decision tree model to the same structure and when go into SET ALGORITHM PARAMETERS pop menu it comes with many pre populated parameters with default values.

My question is that why I am unable to add parameters to the NEURAL NETWORK and why it does not come with pre populated parameters like DECISION TREES.

Your help will be much appreciated.

View 3 Replies View Related

Neural Network Does Not Allow A Table Column As Predictable.

Apr 12, 2007

In Neural Network model, is that a way to have table column as predictable?


Mary

View 1 Replies View Related

Question About Decision Trees And Neural Networks

May 9, 2006

I have some accounting data, with some transaction attributes and amounts.
I'm using Decision Trees to try and predict the next month's amount for certain combinations of attributes.

I've tried two different structures for the model:

A: one with 9 discrete text input attributes.
B: And another with the same 9 attributes + a avarage Amount for all combinations of the nine attribute for every transaction.


When i've processed them and look in the dependency network, it says that the strongest link for the structure A is attribute "1".
And for the second its the avarage-Amount attribute.
Okey, that seems fine, but the second strongest link in structure B is attribute "2".

Shouldn't it be attribute 1 like in structure A?



Second question, if I run the same data in a Neural Network model, the prediction becomes much worst then the decision tree.
I get many predictions that are negative values even though all training data contains positiv values.
The StDev becomes the same for every row also..
What am I doing wrong with that one. I have alot of transactions and a read somewhere that a Neural Network should work better than a decision tree in a case similar to mine.
The score in the "Lift chart" for the Neural Network model becomes 0,00 and for Decision Trees with the same data I get around 110.

View 1 Replies View Related

Question On Lift Value Of Neural Network For Each Attribute Value

Jul 16, 2007

Hi, all,



What can we tell from the lift value of the attribute value in Neural Network? (any so-called threshold of this lift value which identifies whether or not an attribute value is important or whatever to the selecte output attribute value?) I mean with lift value of a particular value, when we describe the characteristics of a segmentaion with Neural network, what can we actually describe it?



I just dont know what can we desribe this for the segmentation by neural network viewer?



I am looking forward to hearing from you shortly and thansk a lot.



With best regards,



Yours sincerely,



View 2 Replies View Related

Question On Value Of Probability Of Value 1 Or 2 In Neural Network Viewer

Jul 16, 2007

Hi, all,



I am confused about the value of Probability of Value 1 or 2 (on a particular attribute value) in Neural Network viewer. E.g. the value of Probability of value 1 is actually very low (the same to the value of Probability of value 2), but why the bar which shows the strength of the probability of these two values are still so strong even stronger than other values of probability of value 1 or 2 based on other attribute values which have a much higher probability of value 1 or 2?



And how does the algorithm calculate the Probability of attribute value in nerual network by the way?



Hope my question is clear.



I am looking forward to hearing from you shortly and thanks a lot in advance.



With best regards,



Yours sincerely,



View 3 Replies View Related

Progress Indicator For Neural Network Training...

Jun 26, 2006



I am in the process of training a Neural Networks, which could take significant iterations in the process of getting trained. While using other tools like I can visually see the convergence (in terms of error for the model). Is there a way to see any progress while training while using Analysis Server - Neural Network training? It would be useful to see the accuracy, interation number and timeout while in the process of training etc...

Thanks

Rajeev Gupta

View 1 Replies View Related

EXEC Of A Sproc Within Another Sproc

Apr 23, 2004

I'm sorta new with using stored procedures and I'm at a loss of how to achieve my desired result.

What I am trying to do is retrieve a value from a table before it is updated and then use this original value to update another table. If I execute the first called sproc in query analyzer it does return the value I'm looking for, but I'm not really sure how to capture the returned value. Also, is there a more direct way to do this?

Thanks,
Peggy



Sproc that is called from ASP.NET:

ALTER PROCEDURE BP_UpdateLedgerEntry
(
@EntryLogID int,
@ProjectID int,
@NewCategoryID int,
@Expended decimal(10,2)
)
AS
DECLARE@OldCategoryID int

EXEC @OldCategoryID = BP_GetLedgerCategory @EntryLogID

UPDATE
BP_EntryLog
SET
ProjectID = @ProjectID,
CategoryID = @NewCategoryID,
Expended = @Expended

WHERE
EntryLogID = @EntryLogID

EXEC BP_UpdateCategories @ProjectID, @NewCategoryID, @Expended, @OldCategoryID



Called Sprocs:

*********************************************
BP_GetLedgerCategory
*********************************************
ALTER PROCEDURE BP_GetLedgerCategory
(
@EntryLogID int
)
AS

SELECT CategoryID
FROM BP_EntryLog
WHERE EntryLogID = @EntryLogID

RETURN


*********************************************
BP_UpdateCategories
*********************************************
ALTER PROCEDURE BP_UpdateCategories
(
@ProjectID int,
@NewCategoryID int,
@Expended decimal(10,2),
@OldCategoryID int
)
AS

UPDATE
BP_Categories
SET CatExpended = CatExpended + @Expended
WHERE
ProjectID = @ProjectID
AND
CategoryID = @NewCategoryID


UPDATE
BP_Categories
SET CatExpended = CatExpended - @Expended
WHERE
ProjectID = @ProjectID
AND
CategoryID = @OldCategoryID

View 2 Replies View Related

Exec Sproc In Sproc

Jan 20, 2004

create procedure dbo.GetZipID( @City varchar(30), @State char(2), @Zip5 char(6))
as
DECLARE @CityID integer
declare @StateID integer
declare @ZipID integer
set @ZipID=2
set @Zip5=lTrim(@Zip5)
if @Zip5<>''
SET @ZIPID = (select Min(lngZipCodeID) AS ZipID from ZipCodes where strZipCode=@Zip5)
if @ZipID is null
set @CityID= EXEC GetCityID(@City);
set @StateID= EXEC GetStateID(@State);
insert into ZipCodes(strZipCode,lngStateID,lngCityID) values(@Zip5,@StateID,@CityID)
if @@ERROR = 0
SET @ZIPID = @@Identity
select @ZIPID


GetCityID and GetStateID are two stored procs, how do I execute those two stored procs
in the above stored proc? I mean what is the syntax??

Tks

View 2 Replies View Related

SQL Server 2005 Limitation: Having Many Attributes For Neural Network

May 21, 2007

Hello,

Say that I have 100,000 attributes/feature selections for my SQL Server Neural Network Algorithm.

Customer Attr1 Attr2 Attr3 ..... Atr100000
==============================
Jack 1 0 1 ..... 1
Sam 0 1 1 ...... 0
Mary 1 1 0 ...... 1

Knowing the fact I can't fit those info on a table and SQL Server's Neural Network does not support table prediction . What's an alternative to use Neural Network in SQL Server 2005 to solve my problem?

Please assist!


Mary

View 5 Replies View Related

Error Using Neural Network Mining Model Viewer

Nov 17, 2006

I've successfully created and processed a very simple neural network mining model (defined against a cube). However, when I go to the model viewer in BI studio, it displays the following error:

"Execution of the managed stored procedure GetAttributeScores failed with the following error: Exception has been thrown by the target of an invocation.Input string was not in a correct format.."

Any ideas about what's going wrong? This is with SQL Server 2005 SP1.

View 4 Replies View Related

Problems With Neural Net Viewer, Lift Chart And Predictions Still Ocurring In SP2

Nov 24, 2006

Greetings,



I have a mining structure that I am using to perform a text-mining
classification task. The mining structure contains three models: a
decision tree, a naive bayes and a neural network.


Both the decision tree and the naive bayes models process without
any problems, but I am having significant difficulties with the neural
network model.


Initially when I processed the model, processing would fail altogether with the following error message:



"Memory error: Allocation failure : Not enough storage is available to process this command"



This was remedied by taking the steps prescribed in
http://support.microsoft.com/kb/917885 (I upgraded to SQL 2005 SP1 and
applied all available hotfixes listed in
http://support.microsoft.com/kb/918222/). This got me to the point
where the model (seemingly) processed correctly after restricting the
MAXIMUM_INPUT_ATTRIBUTES to a relatively low number. So after
processing, I went to try and browse the neural network model and view
the lift chart...



<error>

"Execution of the managed stored procedure GetAttributeScores
failed with the following error: Exception has been thrown by the
target of an invocation.Input string was not in a correct format.."

</error>



(see http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=935340&SiteID=17)



Also when I would attempt to view the lift chart and the
classification matrix the queries would time out with the following
error message:



<error>

XML for Analysis parser: The XML for Analysis request timed out before it was completed.

Execution of the managed stored procedure
GenerateLiftTableUsingDatasource failed with the following error:
Exception has been thrown by the target of an
invocation.Microsoft::AnalysisServices::AdomdServer::AdomdException.

</error>



Now, my poking around on Technet lead me to believe that this issue
could finally be resolved by uprading to the CTP release of SQL server
2005 SP2. Now I am still encountering problems. When I go to browse the
model in the Neural Network Viewer, I see the correct drop down menus
to select attributes and attribute values in the "Input" and "Output"
panes but I see no data displayed in the "Variables" pane at the
bottom.


Interestingly, while I cannot view the model contents in the
graphical viewer, the mining model contents viewer reveals model
contents that look to be pretty normal for a trained neural network.



Attempts to view the lift chart time out with the error message:



<error>

XML for Analysis parser: The XML for Analysis request timed out before it was completed.

Execution of the managed stored procedure
GenerateLiftTableUsingDatasource failed with the following error:
Exception has been thrown by the target of an
invocation.Microsoft::AnalysisServices::AdomdServer::AdomdException.

</error>



and when I run predictions against the trained NN model in the
"Mining Model Prediction" pane it predicts the same value for every
case in the testing set.



Any thoughts?

View 9 Replies View Related

Retrive Score In Logistic Regression (Microsoft Neural Network Viewer - SQL Server 2005)

Feb 19, 2008

Hi!

I bought the book €œData Mining with SQL Server 2005€?, but I can€™t find the solution to a problem I have.

I want to retrieve from C# the logistic regression Attribute Value (AV) Scores for the Logistic Regression Algorithm. I can see the Scores from the Microsoft Logistic Regression Viewer (the same of Neural Network Viewer), but I cannot retrieve them via DMX, OLEDB or similar.

Otherwise, is there a formula that I can use to compute that score from the coefficient, support, or probability values of the Attribute Value pair (I can read this values from DMX)?
I can access to them via DMX:

NODE_DISTRIBUTION -> SUPPORT and PROBABILITY ATTRIBUTE_VALUE...

with a query like

SELECT FLATTENED (SELECT ATTRIBUTE_NAME, ATTRIBUTE_VALUE FROM NODE_DISTRIBUTION WHERE VALUETYPE = ... ) FROM [MyModel].CONTENT WHERE NODE_TYPE ....

Thanks in advance

Regards,
Marco

View 3 Replies View Related

Any Idea?

Mar 4, 2008

i have a table FORUM_REPLY it contain follwing fieldsquest_id,answer_id, reply_user_id.i want who is post most answer.so i need reply_user_id and max(no_of_answer).but following query given reply_user_id and no_of_answer onlySELECT reply_user_id,count(answer_id) as no_of_answer FROM FORUM_REPLY  GROUP BY(reply_user_id)How to get max_no_of_answer? 

View 13 Replies View Related

Can A DTS Do This For Me , If So, Any Idea How?

May 21, 2001

Hi all,

I am new to the DTS game - or at least to trying to do anything other than transfer rows between databases with identical structures.

I now need to create a far more complex DTS package to transfer data between an SQL Server database (I am using SQL Server 7.0) and an Oracle database. I have no trouble in making the connections and performing simple DTS's beween the two.

However, my current task is more complicated.

Problem 1:
In one database I would store fifty values as 5 five records each containing 10 values (i.e. has ten fields). However, in the other database these fifty values would all be stored as one record (i.e. one row with 50 fields). How could I go about creating a DTS to transfer this information?

Problem 2:
These values should only be transfered if certain conditions are met in an another unrelated table. For example, a flag in another table indicating that transfer of the said values should occur.

Any help with either of these problems would be much appraciated.

Thanks in advance,
Ross

View 3 Replies View Related

Any Idea&#39;s On 605

Nov 16, 2000

When one of the users log into the database via a thrid party application
they receive an error message:

2000/11/16 10:40:13.84spid51Error : 605, Severity: 21, State: 1
2000/11/16 10:40:13.84spid51Attempt to fetch logical page 7832 in database 'highview' belongs to object '1241055457', not to object 'application_data'.
2000/11/16 10:45:07.68spid46Getpage: bstat=0x1008/0, sstat=0x80002110, disk
2000/11/16 10:45:07.68spid46pageno is/should be:objid is/should be:
2000/11/16 10:45:07.68spid460x1e98(7832)0x49f900e1(1241055457)
2000/11/16 10:45:07.68spid460x1e98(7832)0x4810b86f(1209055343)
2000/11/16 10:45:07.68spid46... extent objid 0, mask 0/0, next/prev=0/0
2000/11/16 10:45:07.68spid46... retry bufget after purging bp 0x2da7e060


I tried running DBCC checkdb, newalloc,& checktable to fix the probelm and than droping the table and rebuilding it but not success, any suggestion are
more than welcome.

View 1 Replies View Related

Need An Idea How To....

Jun 21, 2002

If anybody can suggest the most efficient way to "page" the output from a big and wide table (about 7000000 records) in order to display on the web in the user requested sort order. Sort order could be on at least 7 different columns from 50 of returned.

I need to find a solution to move to the next and previous page.

Any Idea?

Dim

View 2 Replies View Related

Just An Idea

Jul 23, 2004

what if I took this trigger and based it on a view rather then a table

CREATE TRIGGER TerminationUpdateTrigger ON EmployeeGamingLicense
FOR UPDATE
AS
INSERT INTO TERMINATION(Status,[TM #],LastName, FirstName, [SocialSecurityNumber], DateHired, Title)
SELECT STATUS, [TM#], LASTNAME, FIRSTNAME, [SSN#], HIREDATE, JOBTITLE
FROM Inserted
WHERE STATUS = 'TERMINATED'


CREATE VIEW dbo.Update_Terminations
AS
SELECT STATUS, TM#, LASTNAME, FIRSTNAME, SSN#, HIREDATE,
JOBTITLE
FROM dbo.EmployeeGamingLicense
WHERE (STATUS = N'TERMINATED')

Base the Trigger on this View rather then on the Table itself????

View 2 Replies View Related

Some Idea

Apr 27, 2008

Hi I'm new to sql and it would be great if someone could give some idea on how to do the following

This is the relational model:

Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)
Academic(AcNum, DeptNum, FamName, GiveName, Initials, Title)
Paper(PaNum, Title)
Author(PaNum, AcNum)
Field(FieldNum, ID, Title)
Interest(FieldNum, AcNum, Descrip)



The question is :-
Which academics have the largest number of fields of interests? Return their academic number,
given name, family name, institution and total number of fields they are interested in. Your must use a
subquery in the sense that you must use 2 sql statements and use any of the following to connect both:-


1)Exists
2)Not exists
3)IN

View 5 Replies View Related

Someone Have Any Idea About It?

Sep 18, 2006

I have a table call CLIENTE and another table call ENDERECO where the CLIENTE table has the FOREIGN KEY of the ENDERECO table.

When I try INSERT COMMAND in C# this message is show.

The instruction INSERT conflicted with a constraint of FOREIGN FUNDAMENTAL "FK_CLIENTE_ENDERECO." The conflict happened in the database "E:ARQUIVOS DE PROGRAMASMICROSOFT SQL SERVERMSSQL.1MSSQLDATALINETEC.MDF", table "dbo.I ADDRESS", column 'IDENDERECO.'
The instruction was concluded.

I am a "little" lost.

Thanks.

View 3 Replies View Related







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