navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Sort Possible?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Sort Possible?
Page: [1]
 
swoosh

 

Posts: 1438
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
Sort Possible? - 8/11/2008 18:37:25   
Is it possible in anyway to sort a database grid on a web page by the following:

On the page now is standard properties with addresses and so forth. The address field is like "1234 Grant Street". The info is sorted by this field but now the client wants it so that it is sorted by street first and then by number. If there is no separate field for the street is this even possible?

Example Now:

123 Grant Street
123 Fifth Avenue
124 Grant Street

They want all the streets together unlike the above

_____________________________

Swoooosh
Just Do It!

ou812

 

Posts: 1601
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Sort Possible? - 8/11/2008 19:26:57   
I think it is pretty tough to do with the variations of address formats, especially if you have out of US address too. To get a sorting down, you should break the address down to it's basic components, at least for the street address portion - Number, Direction, Street, Type. And then allow directions and types to be of one format. (Always E or East, or always Dr. or Drive etc.)

So if you're storing the addresses in one column in your database right now it is going to be pretty difficult to sort them nicely. You may have addresses entered as these:

123 E. Grant Street
123 Grant Drive
123 W. Grant Way
123 East Grant St.
123 West Grant Wy
123 Grant Dr.

And then if they start putting suites or apartment numbers in on the lines might make it more difficult.

You would need to think about how you would sort things like the above. Keeping the components in different columns and only allowing a set way to enter data would make it easier.

_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to swoosh)
swoosh

 

Posts: 1438
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
RE: Sort Possible? - 8/11/2008 19:33:35   
As I suspected Brian. Thank you for replying

_____________________________

Swoooosh
Just Do It!


(in reply to swoosh)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Sort Possible? - 8/15/2008 10:14:52   
<$.02>
Might that still work tho? Wouldn't E. Grant St be different than Grant St? (But of course also different than East Grant St.)

I think a Regular Expression might be able to do that. It would at least be able to filter out all the non-alpha characters for a sort. I don't think you'd be able to put it in an SQL statement, but an array and a RegExp function you could.

Just a guess.

</$.02>

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to swoosh)
pd_it_guy

 

Posts: 191
Joined: 3/4/2008
Status: offline

 
RE: Sort Possible? - 8/15/2008 10:41:36   
I suppose there is another way, still.

-1234 E Grant St is the exact same place as
-1234 East Grant St, and the exact same place as
-1234 E. Grant St

Sorting non standardized data is not really the issue, it is the non-validated free-form addresses that are going in. The data is bad.

Would the client allow (or would you consider) the addresses be standardized, so that at some point EVERY address for East Grant is uniform. Sort of like a Master Name Index. We want all the John Jones that are turly the same person to be the exact same and not variations. It would have to be a clean up function run by the dba.

I think an vb REPLACE (a string within a string) kind of function would do. I dont have a db and server handy right now so I can't be much more helpful. Others would know exactly how to do it.

my .02 worth this morning

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Sort Possible?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts