DeveloperBarn Forums

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

Discuss "selecting value" in the ASP Development forum.

ASP Development - Learn coding practices and tips to get the best out of your Active Server Pages (ASP). The Classic ASP forum is for ASP/VBScript and ASP/JScript applications.


Reply « Previous Thread | Next Thread »  
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old June 21st, 2008, 10:05 AM
Contributing Member

 
Join Date: Mar 2008
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
todd2006 is an unknown quantity at this point
Default selecting value

Hi,

I have a table the design is like this

ID
Description


In description the field can hold values in 2 ways

Tee - Shirt XL
Tee-shirt Size - None


Either the sizes will be S, M, L, XL, XXL, XXXL after Tee - Shirt

What i want to do is check what value the field has

If it has Tee-shirt Size - None then set the strtshirt variable to No Tshirt

If the value is like this Tee - Shirt S or Tee - Shirt M or Tee - Shirt L or Tee - Shirt XL or Tee - Shirt XXL or Tee - Shirt XXXL


then get the shirt size like S, M, L, XL, XXL, XXXL and store it in the variable strtshirt

I am having problems how to query the table and then extract the shirt size


todd
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old June 23rd, 2008, 01:59 AM
don94403's Avatar
Moderator


 
Join Date: Mar 2008
Location: San Mateo, CA, USA
Posts: 43
Thanks: 2
Thanked 3 Times in 3 Posts
Blog Entries: 2
Rep Power: 1
don94403 is on a distinguished road

Awards Showcase
PHP Microsoft Access 
Total Awards: 2

Default

I responded to your question in ASPFree forums. Check there.
Reply With Quote
  #3 (permalink)  
Old June 23rd, 2008, 08:53 AM
Contributing Member

 
Join Date: Mar 2008
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
todd2006 is an unknown quantity at this point
Default

I know the table design was poor but it holds 111,000 records I dont have permission to change it thats the problem
Reply With Quote
  #4 (permalink)  
Old June 23rd, 2008, 09:20 AM
BLaaaaaaaaaarche's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 43
Thanks: 10
Thanked 6 Times in 4 Posts
Rep Power: 1
BLaaaaaaaaaarche is on a distinguished road

Awards Showcase
Classic ASP 
Total Awards: 1

Default

Why not use a LIKE query to search for fields that contain "tee" and "shirt":

Code:
strSQL = "SELECT * FROM MyTable WHERE MyField LIKE '%tee%' AND MyField LIKE '%shirt%'"
Then, once you have those, you can use some logic to split apart those strings. Hopefully you will be left with the size.

Comments on this post
jmurrayhead agrees: indeed
__________________
"You'll never be as perfect as BLaaaaaaaaarche."
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Sponsored Links

ASP.NET Resource Index
a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer.

Free Web Directory
Including Chats and Forums Resources, Offer automatic, instant and free directory submissions.
URLZ Web Directory
URLZ Web Directory

Free Web Directory - Add Your Link
The Little Web Directory
Free Web Directory
Pegasus free web directory is a free directory organised by categories.

Web Directory & SEO Services
dirroot web directory


All times are GMT -4. The time now is 07:49 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 DeveloperBarn.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46