Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 ClickPath

Author  Topic 

bjornh
Yak Posting Veteran

87 Posts

Posted - 2003-01-12 : 11:35:18
Hi,

Again, I'am stuck...

This time, i've got a clickpath And I want to remove the duplicates.

The table has 2 columns:
Clickpath, Total

sample data:

[1][1][3][2][2] | 43
[1][3][2] | 32
...


The [1] is the ID for page #1 at another table, [2] for page #2 and [3] for page #3.

Now, if you remove the duplicates, the 2 clickpaths are the same (page1, page3, page2). And that is exactly what I want. so the result of the query should be:

[1][3][2] | 75

or even better:
page1 - page3 - page2 | 75


Is this even possible? I really don;t know how I could get this working. So idea's are welcome...

Thanks
Bjorn

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2003-01-12 : 14:58:07
You don't have a good table structure for this. Each click should be a row in a table; not string-concatenated all into 1 column. Once you change structures the query should be simple.

Jonathan
{0}
Go to Top of Page

bjornh
Yak Posting Veteran

87 Posts

Posted - 2003-01-12 : 16:09:41
I was allready thinking of it. This solution was still a leftover from a database design for diskspace saving...

1 question:
I don't think i will ever meet the max of the integer (2,147,483,648) but, is it smart to let the id for this row start at -2,147,483,648 so I can have twice as much pageviews? or, when i will be there, change it to a bigint?

Thanks

Bjorn



Update: I found a article for the people who are interested: http://www.sqlteam.com/item.asp?ItemID=4123

Edited by - bjornh on 01/12/2003 16:38:56
Go to Top of Page

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2003-01-12 : 19:39:17
Don't bother, start it normally and convert it to a bigint if you need.

Jonathan
{0}
Go to Top of Page

bjornh
Yak Posting Veteran

87 Posts

Posted - 2003-01-13 : 09:42:47
ok thanks Jonathan.

Go to Top of Page
   

- Advertisement -