Avatar of al4629740
al4629740Flag for United States of America

asked on 

sort by address

I have an the following statement in vb6 to get data:
esql = "select Address from Illinois where State = " & ravi & Combo1.Text & ravi & " And City =" & ravi & Combo2.Text & ravi

How do I order the output by the "Street"   If I order it by Address, then most addresses start with a number.  But I don't want it to sort by the numbers of the address but rather the street names.

any help on this one?
Visual Basic Classic

Avatar of undefined
Last Comment
Ryan Chong
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Is that possible to have an extra field called as "Street" in your database?

By the way, what's your database you using?
Avatar of al4629740
al4629740
Flag of United States of America image

ASKER

I'm using SQL Express.

No, not possible to have Street only
Avatar of game-master
game-master
Flag of Philippines image


add this on your sql..

esql = "select Address from Illinois where State = " & ravi & Combo1.Text & ravi & " And City =" & ravi & Combo2.Text & ravi  ORDER BY street  asc...

make sure the "street" field exist on your database..
Avatar of al4629740
al4629740
Flag of United States of America image

ASKER

****this is an existing database that has an address field with the whole address in the field.  The street is not separated out*********
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

165K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo