I have a field name "tracks" of string data type that has multiple names in it (for example: calder delaware$ aqueduct ), and I want to check to see if this certain field has "delaware$" in it. InStr or the Mid functions return the numerical order of where that string starts inside the string, but it doesnt tell me if "delaware$" exists in "tracks".
I been trying to figure out the following. I have a string of 9 numeric characters such as 000982675 and 001000510. The problem I have is in the following code:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Undefined function 'substr' in expression.
on my statement:
set rs1=db.execute("Select * from lecnatl where substr(natdp,1,2)='"&a_natdp&"'")
I dont want those Disp selected from access db...I am getting an error..How will I do that ? Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "49, 50"]'
/drv_sch/Generate_Sch.asp, line 55 ---------------------------------------- Driver_id is a number...Disp variable has these data "49, 50, 51" SELECT * FROM schedule WHERE not instr('Disp',driver_id)
Using MySQL as a DB, I'm generating an OTF SQL statement that looks for matches in a comma delimited string. The code ends up looking something like this: Code:
<% If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>") Else Response.Write(TestRS.Fields.Item("Testimonial").Value) End If %>
I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.
I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.
Code: Select * From groups Where groupName LIKE '%bli%' AND cusType LIKE 'CUST%' or
Code: Select * From groups Where InStr(groupName,'li')>0 AND InStr(cusType,'CUST')=1 Right now I'm using and Access database but plan to upsize to a MSSQL if that makes any difference. Are there any advantages or disadvantages to either technique?
Just used this code and noticed it doesn't always work, turns out InStr is case sensitive.What's thet best way to do a non-case sensitive search?pHP Code:
Basically, the first number (B2020, which could be a number of different numbers) is the model. the second and/or third number is what I have to act on. The problem is, how do I pull that third number? Especially if its the same as the first number. right now I'm using Instr(variable1, "SG1") to pull each different set of numebrs. but that only finds the first occurence. what about the 2nd? how can I find that?
I use: ----------------------------- dim strText,pos strText = "This is a test!!" pos = Instr(strText,"a",1) response.write pos ----------------------------- and i get:
I'm having some trouble with an error that is thrown when I use InStr() and Mid() with a database search query. In point form:
I am retrieving an array strings from my database where the query is case insensitive. This is good.
Then I locate the keyword in the string using InStr() which is case sensitive. This is not desireable as it doesn't recognize all instances of the keyword.
I use the Mid() function to give me a portion of the string starting at the location provided by InStr() which is sometimes the number zero which in turn throws the error.
I have a string --> 7,8,9,10. This string may contain more or less than 4 numbers. I want to separate each number and run an sql query for each number.
I have a variable - a large string of text - called row1. Im using VBscript to parse this row for useful information that I need. The row1 starts off as follows:
Im using the position of the bSlip ---- Instr(row1, "bSlip(") to find out where the bSlip text starts and this works fine. The next few lines of text are supposed to use the position of the ">" character and the "<" character to extract the text in between. Code:
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:
I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.