DeveloperBarn Forums

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

Discuss "Help with If contains then" 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.


Closed Thread « Previous Thread | Next Thread »
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old May 2nd, 2008, 01:57 PM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

show me what you have for that line. i edited my code and added a parenthesis because i was missing it when i first posted. I've tested this code in a quick sample page and i'm not getting any errors.
__________________
Quote of the Month:
Sanity: Minds are like parachutes. Just because you've lost yours doesn't mean you can borrow mine.

Questions to Ponder:
Why is the third hand on the watch called the second hand?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright © 2008 sbenj69

Last edited by mehere; May 2nd, 2008 at 01:59 PM.
Sponsored Links
  #12 (permalink)  
Old May 2nd, 2008, 02:00 PM
Rebelle's Avatar
Contributing Member

 
Join Date: Mar 2008
Posts: 165
Thanks: 32
Thanked 1 Time in 1 Post
Rep Power: 1
Rebelle is on a distinguished road
Default

Here is what I have for the error line:

Code:
strType = MID(strLoc,inStr(strLoc,"-")+1,len(strLoc))
Thanks again!
  #13 (permalink)  
Old May 2nd, 2008, 02:04 PM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

try changing to this ... i just need to check something
Code:
strType = MID(strLoc,4,len(strLoc))
  #14 (permalink)  
Old May 2nd, 2008, 02:26 PM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

NT ... nevermind ... that wasn't it.

Last edited by mehere; May 2nd, 2008 at 02:30 PM.
  #15 (permalink)  
Old May 2nd, 2008, 05:27 PM
Rebelle's Avatar
Contributing Member

 
Join Date: Mar 2008
Posts: 165
Thanks: 32
Thanked 1 Time in 1 Post
Rep Power: 1
Rebelle is on a distinguished road
Default

When i use this suggestion, i don't get any errors but maybe i don't have my loop right or something because it only showed "strType" once.

Code:
strType = MID(strLoc,4,len(strLoc))
I'll keep digging...Thanks Mehere!
  #16 (permalink)  
Old May 5th, 2008, 08:49 AM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

show the whole code that you're using ... maybe it's something i'm missing.
  #17 (permalink)  
Old May 12th, 2008, 08:33 AM
Rebelle's Avatar
Contributing Member

 
Join Date: Mar 2008
Posts: 165
Thanks: 32
Thanked 1 Time in 1 Post
Rep Power: 1
Rebelle is on a distinguished road
Default

Thanks Mehere,
Sorry for the delayed response back, last week was awful and today will be the same but I should be able to post back code tomorrow or wednesday at the latest.
  #18 (permalink)  
Old May 12th, 2008, 01:57 PM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

np ... will keep an eye out for it.
  #19 (permalink)  
Old May 14th, 2008, 10:23 AM
Rebelle's Avatar
Contributing Member

 
Join Date: Mar 2008
Posts: 165
Thanks: 32
Thanked 1 Time in 1 Post
Rep Power: 1
Rebelle is on a distinguished road
Default

Ok, after looking at this again, it looks like the data is a bit more complicated. Right now I do have it putting everything with ready first and then everything that contains repair.

some of the data contains more alpha/numeric and hyphens like,
XX-XX-XXX-READY
XX-XX-XXX-REPAIR-XX##
XX-XX-XXX-REPAIR

i'm not going to worry about slipping in a group name "ready" or "repair" to separate.

Thanks Mehere for all your help!!!
  #20 (permalink)  
Old May 14th, 2008, 10:48 AM
mehere's Avatar
Global Sarcasm Mistress

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 113
Thanks: 10
Thanked 21 Times in 19 Posts
Rep Power: 1
mehere is on a distinguished road

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

you can add something else into your query to do this then ... add another column for the column that contains those values ... something like this
Code:
CASE WHEN CHARINDEX('READY',column_name) > 0 THEN 'READY' ELSE 'REPAIR' END AS type
change your ORDER BY clause
Code:
ORDER BY Type, column_name
then you can still use the other code i posted to keep 'REPAIR's together and 'READY's together.
Closed Thread

  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 01:09 AM.


Powered by vBulletin® Version 3.7.3
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