Sueqntially Numbered Subsets

Mar 25, 2008

I have a table that is created based on a heirarch of set criteria and need to number the subsets within. The best way to illustrate what I want to accomplish is through an example.

Rank | Item_1 | Item_2 | Class
---- | ------ | ------ | ------
1 | 1A | 1B | ExactMatch
2 | 1A | 1C | Sub
3 | 1A | 1D | Sub
1 | 2B | 2F | ExactMatch
2 | 2B | 2G | Sub

Is there a way to accomplish this? Any help or suggestions are appreciated.

I apologize for the formatting, but I think you should be able to get the point.

thanks,

View 3 Replies


ADVERTISEMENT

Dataming Of Subsets Question

Jul 26, 2007

Have not found an active general data mining forum yet so asking here.

I'm new to data mining band have been given the task of setting up a data mining system. The problem is that our setup seems pretty non standard and I'm not sure how to use data mining on it or what my expectations should be. The situation is:

We have a large and growing set of strings which we get requests for (> 100,000). The requests have many, mostly nominal (non-numeric), variables associated with them. We can only handle a subset (probably less than 10,000) or the strings at any one time. We want to use data mining to analyze historic requests so we can figure out which strings we are going to handle under a given set of variables. So given that our variable currently have values X1, ..., Xn, what subset should be use given than a large database of historic string requests.

Anyone know what techniques would work well for this kind of problem? This is a quick and dirty kind of project, no special purpose hardware or expensive software on this one. I've been looking at using rapid miner but not sure that it's a great tool in this case.

thanks in advance,
max

View 4 Replies View Related

Constrains On Table Subsets

Oct 12, 2007

Hello!
I'm looking for some ideas about how
to ensure constraints on multiple rows.
Of course one can use stored procedures and/or triggers while inserting.
Other ideas?

The reason for this question is that it could be hard to ensure,
because if lock level is not high enough, you can get duplicates during concurrency,
if lock level is too high, it can result in deadlocks.

Thanks

View 5 Replies View Related

Greater/Less Than Query From Within Subsets Of Results

Sep 27, 2005

I think I'm trying to do a simple query on maximum date.

I've got 100 tools that have been used over the past three years.
Some of the tools are used almost every day. Other tools haven't been used for a month, while other tools haven't been used for a year or more.

Ultimately I'm trying to just find the list of tools whose latest date of use was a year ago.

I have a list of tools and a list of times each tool was used.

I think I'm going to have to do a search that for each tool what was the times it was used. That I can do.

What I'm not sure of is how to then pull only the latest date for each tool.

Once I get that I can then do a query off that result to pull the "oldest latest" date of use.

View 1 Replies View Related

Returning Subsets Of The Same Column In Separate Columns...

Mar 23, 2006

I have the following 2 Sql queries. They both are rowcounts of the same column but based on different criteria. What I want to do is return the two results side by side in separate columns:
-- Subscriptions since Sept. 24th
SELECT count(*)
FROM SiteMemberTable103 s(nolock)
JOIN clientmembertable25 c(nolock) ON s.memberid = c.memberid
WHERE site_firstjoindate is not null
and c.clientunsubscribe = 0
and c.validemailaddr = 1
and s.unsubscribe = 0

-- Subscriptions in February
SELECT count(*)
FROM SiteMemberTable103 s(nolock)
JOIN clientmembertable25 c(nolock) ON s.memberid = c.memberid
WHERE site_firstjoindate BETWEEN '2006-02-01 00:00:00.000' AND '2006-03-01 00:00:00.000'
AND c.clientunsubscribe = 0
AND c.validemailaddr = 1
AND s.unsubscribe = 0

It seems like a UNION ALL should work but it just returns the results in one column. I tried changing the count by specifying a different column for each but that doesn't work either. I also tried writing it as one query and using alias to differentiate the two tables but that just gives me syntax errors. I suspect there is a more elegant way to do this but I'm at a loss. Any help would be greatly appreciated!

Caeanis

View 1 Replies View Related

Adding A Sequentially Numbered Column

Aug 4, 2006

Hey guys,

Was wondering if there was a way to add a new column to a table, and then use some type of INSERT statement to sequentially number the column from 1-end of the table without using an IDENTITY column.

For instance if I wanted to add a sequentially numbered column in a table with 50 rows that already had an IDENTITY column.

Thanks in advance.

View 6 Replies View Related

Dropping An Auto Numbered Primary Key And Add A New One

Oct 30, 2006

The table I am using have a column called Key which is the primary key of the table and a auto number. This primary key is not a foreign key in any other table.

I need to write SQL to drop the current primary key and add a new one Say "RecordId"

as the new primary key and which should be a autonumber too.

any idea.

thanks in advance

View 3 Replies View Related

Selecting A Specific Numbered Range Of Rows.

Jul 26, 2006

Hello all, thanks in advance for any help you might be able to give.

I'm familiar with the Top command but I need something else to help in a project I'm working on.

I would like to select rows 1 through 100000 from a specific table in one query then 100001 through 200000 in a second query and 200001 through 300000 in a third and so on until I have gone through all rows. There happens to be 424000 in the table I'm working on.

Any help is appreciated.

View 12 Replies View Related

Query Issue (Auto Numbered Column)

Mar 15, 2008

Hello Guys!I have an important for me and maybe easy question for you...

I want to take the results of a select but i want the first column to be an auto incresement Number...

For example
aa Name Number
1 Alexander Papadopoulos 212222222
2 .... ...
3
4
5

How Can this happen?


I sell my mother in law.Is anybody interested?

View 8 Replies View Related

Creating A New Numbered Column As Primary Key In A Table

Jul 23, 2005

This is a fairly simple question, but what is the easiest way to:create a new numbered column (where value is simply the row number) inan existing table and setting it as a primary key?

View 1 Replies View Related

T-SQL (SS2K8) :: Finding Previous Even Numbered Month And Appropriate Year From Given Date

Mar 25, 2014

I'm trying to write some T-SQL to return the previous even numbered month and appropriate year from given date.

Examples given:
03-25-2014 should return 02-xx-2014
01-01-2014 should return 12-xx-2013

View 2 Replies View Related







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