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
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 05-02-2008, 01:57 PM
mehere's Avatar
Mistress of Sarcasm

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
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:
Strife: As long as we have each other, we'll never run out of problems.

Questions to Ponder:
I went to a bookstore and asked the saleswoman where the self-help section was and she said if she told me, it would defeat the purpose.

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

Last edited by mehere; 05-02-2008 at 01:59 PM.
Sponsored Links
  #12 (permalink)  
Old 05-02-2008, 02:00 PM
Rebelle's Avatar
Contributing Member
 
Join Date: Mar 2008
Posts: 102
Thanks: 15
Thanked 0 Times in 0 Posts
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 05-02-2008, 02:04 PM
mehere's Avatar
Mistress of Sarcasm

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
Default

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

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
Default

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

Last edited by mehere; 05-02-2008 at 02:30 PM.
  #15 (permalink)  
Old 05-02-2008, 05:27 PM
Rebelle's Avatar
Contributing Member
 
Join Date: Mar 2008
Posts: 102
Thanks: 15
Thanked 0 Times in 0 Posts
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 05-05-2008, 08:49 AM
mehere's Avatar
Mistress of Sarcasm

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
Default

show the whole code that you're using ... maybe it's something i'm missing.
  #17 (permalink)  
Old 05-12-2008, 08:33 AM
Rebelle's Avatar
Contributing Member
 
Join Date: Mar 2008
Posts: 102
Thanks: 15
Thanked 0 Times in 0 Posts
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 05-12-2008, 01:57 PM
mehere's Avatar
Mistress of Sarcasm

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
Default

np ... will keep an eye out for it.
  #19 (permalink)  
Old 05-14-2008, 10:23 AM
Rebelle's Avatar
Contributing Member
 
Join Date: Mar 2008
Posts: 102
Thanks: 15
Thanked 0 Times in 0 Posts
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 05-14-2008, 10:48 AM
mehere's Avatar
Mistress of Sarcasm

 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 75
Thanks: 5
Thanked 11 Times in 9 Posts
Rep Power: 1
mehere is on a distinguished road
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


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.


All times are GMT -4. The time now is 01:05 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
©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