Like Statement First Letter

i want to query a fields first letter.how can i do this?Code:

strsql = "SELECT * FROM COORD WHERE First='" & Request.Form("UserName") & "' AND last LIKE '%" & right(last,1) & "%' and active ='" & Request.Form("Password") & "'"

I want the search last by only the first letter of there name.

View Replies


ADVERTISEMENT

Get UNC From Drive Letter

1. The file is on a map drive, which is mapped to a folder
on the same server. Example. The user's folder 'John'.
2. I am able to get the file information
("E:PhotosImage1.jpg") and can copy the file to the
folder. ONCE I KNOW THE UNC ("headoffice-
dellsystPhotosImage1.jpg" file to copy)
I would like to be able to get the UNC from the user's
system, by submitting the drive letter to a function.
This script is for an Intranet and should be in ASP or
JavaScript.
..

View Replies View Related

Letter At Certain Position

After I read in a value from a table i need to read in the last letter of the value and check if it has an "s" as its last letter, so that i can display either ' or 's.

Does anyone know how code to view the last letter of the value or move the variable into javascript so that I can manipulate it from their?

View Replies View Related

First Letter To Uppercase

i need to convert the first letter of a veriable to uppercase (the veriable is loaded and the applied LCase() ).

View Replies View Related

Capitalize Letter

im building an ecommerce site. I asked the client to populate the database i built with all 3000 of their products. They have done this, but put all the data in in CAPITALS. Ive tried 'capitalising' (first letter of each word is a capital) the words in css, but that doesnt work because the letters are all in caps (it would work if they were in lower case).

Has anyone a function written in asp (jscript) to achieve this? Or should I try doing this in sql if this is possible?

View Replies View Related

First Letter Is Uppercase

I want to take a value that users type into a field (actually 2 fields--first and last name) and convert the first letter to Upper Case. I thought I could use UCase, but it seems to only work for an entire string.

View Replies View Related

Capitalize First Letter

We have an ASP VBScript email autoreply. I'd like to make it extra squeaky-clean and have it auto-capitalize the user's first name if they did not. I.e.

"Dear bob, your order has been placed."

to

"Dear Bob, your order has been placed."

I realize that probably the pro way would be to normalize it in the DB when they first sign up.. but this is not necessary, I just need some kinda left-trim-uppercase-codeamabob.

View Replies View Related

Asp Sort Records By First Letter

I am using asp and access database on my page Up untill now I have just been listing all catagories from the database on one page, now the list has become huge.

I would like to have a page with an alphabetical list of links A, B, C etc and then just display the catagory records beginning with A etc depending on user input.

View Replies View Related

Selecting DB Results Where First Letter = ?

What query would I have to use to select entries from a database where there first letter is a letter of the alphabet? ie. Select all entries starting with an A etc.

View Replies View Related

I Have Records Where I Need To Replace One Letter With Another.

I have records where I need to replace one letter with another. Can I modify this highlighting code to do that?

What I need to do is to update my table of database where a column has to replace one letter with another. WHat I have is the "insert into" statement where I duplicated the table (not shown below) Code:

View Replies View Related

First Letter In Upper Case

How to make first letter of word in upper case?
i.e. hello should return Hello
Is there any inbuilt function?

View Replies View Related

Chopping Off The First Letter Of A String

Basically i have a string with a value that either starts with U or N.

If the string starts with a U, I would like to chop that U off but leave the rest of the string. If it starts with an N, then i would need to keep the N on the string. For example,

strUID = U369373

If strUID = 'starts with a U' Then
'Chop off the U to create 369373 instead of U369373'
End If

Should be a fairly easy logical statement, but i just forgot the variables to do that.

View Replies View Related

Letter Be Is Inserted Into Numbers

when I ourput data from Access, numbers bigger than 999 are shown with letter "B" inserted into the 4th position left to the coma. (in my w2k regional settings I have the decimal dot separator set to "." and digit group separater set to nothing. In Access the number are shown with "." as decimal separator, but for some reason ASP used "," instead)
Say, 3000,00 is shown as 3B 000,00 Why and how do I sort this out?

View Replies View Related

How Do I Find How Many Instances Of A Certain Letter - VBScript

I need to figure out how many instances of a certain letter appears in a string or array. The result should appear in a message box, looking something like this:

- The letter a appeard 2 times
- The letter b appeard 5 times
and so forth.

Any ideas on how to acomplish this?

View Replies View Related

Get Database Values And Change Them To A Letter

I have a dynamic table asp/vb that is returning records as expected. There are 7 fields that are returning boolean values based on whether there is or is not a meeting on those given days.

My table is returning TRUE and FALSE and all I want to do is create an if or select statement that will detect the values in these fields and change them as follows:

If true, then field = "R" (Wingdings2 R is a checked box)
If false, then field = "T"(Wingdings2 returns a x'd out box)

View Replies View Related

Create Automated MailMerge Letter

how to create automated MailMerge which creates a form letter using SQL connection using ASP?

View Replies View Related

Auto Numbering (letter-number)

i want to make a data field with an auto numbering , but i exactly want is like this CT-1 , CT-2,CT-3 , the Ct letters must be before the autonumber , so its seems to me in that case i cant choose the dat field in my db as int and choose identity Yes cause the identity seed will be an integer only and no way to put with it a number.

so i want to make throw asp and put this datfield as a char so it can accept the(letter-number)value , so how can the asp make an autonumbering, and know what the lastnumber so it can add 1 to it.

View Replies View Related

Convert First Letter Of Every Sentence To Capital

I'm trying to grab my form field and convert the first letter of each sentence to a capital letter, and the rest of the sentence lowercase (except for I, A etc..)

I've searched all over the place, and only came across functions that convert the first letter of every word to upper case. Now they call these proper case functions. I was taught in grade school that proper case is the first letter of a sentence is capital, and the rest are lower case. So WHY does everyone call these functions proper case functions??!!?? Ok enough venting.

Anyways if you know where I can find a similar function please help me out. I'm sure I could code this, but I just don't have the time right now, and I'm tired, and the Colts lost.

View Replies View Related

Making Every Word's First Letter On A Field, Uppercase

I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how... any hint?

View Replies View Related

Exporting Data Into A MS Word Serial Letter Via ASP

I have a asp page with a database connection where I need to export adresses
into a MS Word Serial Letter. Is this possible and if how??

View Replies View Related

Remove Every Single Letter Word In A Sentence

Im trying to remove every single letter word in a sentence [a-z] or [0-1] and remove duplicate spaces in the result if any.

"a car is good" = "car is good"
"drink a beer" = "drink beer"

View Replies View Related

Regex :: To Allow Lowercase And Uppercase Letter, And Numbers?

What's a way (like, for a username) to allow lowercase and uppercase letter, and numbers?

Code:

objRegExp.Pattern = "[a-z][0-9]"
objRegExp.Global = True
objRegExp.IgnoreCase = True

That's what I have, but I want to make the letters or numbers OPTIONAL, but right now they are required. how can I fix that?

View Replies View Related

If Statement

If a user enters in this to search a db

"Jon Doe" James Doh

return all of the exact matches Jon Doe (user uses quotes to clarify an exact search)
along with that: return all of the James and all of the Doh as well
qry to look like this as soon as I am able to divide up the string entered in by the user
select * from table where (NAME LIKE '%Jon Doe%') or
(NAME LIKE '%James%') or (NAME LIKE '%Doh%')

Thinking of using the instr to find the " but then what do I do to find the string inside of the two quotes, One quote would be easy. there is a couple of checks to preform:anyone run into this before or have any ideas/samples, etc

View Replies View Related

Sql Statement ?

I have created a query wizard page with ddl as your choice to find info. now each ddl has a default of a dash.

The thing is I want to do is have the sql statement to look through the database even when some of the ddl have a dash on them. or just ignore the ones with a dash and look for the ones that are selected. Is there any suggestions for this.

View Replies View Related

ASP If Statement

Below is my code for a question system i have created. However, i need to insert an if statement that redirects the user to test.asp if the value of q_id is not in my database, but i dont know how to do it?

<%
q_id = request("q_id")

sql = "SELECT * FROM questions WHERE PARENT_ID = 1"
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open sql, objConn

sql_sql = "SELECT * FROM questions WHERE PARENT_ID = " & q_id
Set objRS3 = Server.CreateObject("ADODB.Recordset")
objRS3.Open sql_sql, objConn

%>

View Replies View Related

AND Statement

my AND statement is not working and I dont know why????

sql = "SELECT * FROM calls WHERE tech=" & userID "AND status = Open"

tech and status are the DB fields

userID is a variable

Open is just a word

View Replies View Related

If..Else Statement

i make a form with an AccountId box on it , when u enter the accountid in the box , and submit it will send u to a page that show u all the data for this accountid(retreive data)

until here everything is ok , and when i enter for ex. accountid : 5 , all the aacountid fiel data will be show to me , but the problem when i enter am unvalid accountid , it will give the error page that

what iwant to do that i want when i enter an unvaildaccountid an error text show to me like

response.write("The Id that u entered is unvaild , Try Again")

and this is the code , if u can change on it Code:

View Replies View Related

IF Statement

I am trying to use the following IF statement, and whenever I use a
single or double quote, I receive a syntax error. When using no
quotes, the syntax is accepted, but the statement does not perform
properly.

***The problem line***
<% if violation_type=''Tardy'' THEN %>
***rest of the statement***
TARDY VIOLATIONS
<% if rs2.Fields(0) = 0 THEN %>
This is the first unexcused Tardy violation for this employee. A
coaching is required. Click <A HREF=blah>HERE</Ato issue the
coaching.
<% ELSE %>
This employee has <%response.write(rs2.Fields(0))%previous
violations.
<% END IF %>
<% ELSE %>
The <%response.write(violation_type)%violation has been recorded.
<% END IF %>

Variables defined:
violation_type = request.form("violation_type")

View Replies View Related

If/Then Statement

On a page with a form (post method) and a hidden field "Process value = true", why would this statement not work:

<%
if request.Form("Process") = "true" THEN
The code in here sends an email to the user via CDOSYS
End IF
%>

This is what I have going on and it does not send the emal when the form is posted. Removing the If statement obviously sends the email the moment the form page is accessed, but thats not right.

View Replies View Related

Statement Not Following

i have a couple of if statements and it goes something like this, the user will try entering their username and password in the login page then they will be taken to a verify page, then it will decided if the user can be send to the login page again or to the invalid page. The problem is that after 3 times the user is still send to the login page and not the invalid page My verify page code is :-
<%
session("try") = try
if try = "" then
try = 0
else
try = try + 1
end if
if try <> 3 then
response.redirect("login.asp")
else
response.redirect("invalid.asp")
end if

View Replies View Related

My Sql Statement

Recordset1.Source = "SELECT `bestsellerslists`.`itemnumber`, `bestsellerslists`.`list`, `products`.`Product_ID`, `products`.`Product_Name`, `products`.`Price`, `products`.`Sale_Price`, `products`.`Smallpic` FROM `bestsellerslists` INNER JOIN `products` ON (`bestsellerslists`.`itemnumber` = `products`.`Product_ID`) WHERE (`bestsellerslists`.`list` = "girlinfant")"

In Macromedia, the recordset tests fine. When I start the page, I get an error. Do you see anything wrong with this? If I delete the WHERE clause it works.

View Replies View Related

If Statement

I'm having a problem with my variables. They print to screen fine, but when I try comparing them, they don't work. Can anyone tell me what I'm doing wrong?


If Category <> CurrentCategory then
response.write "<tr><td>Category:" & Category & "</td></tr>"
response.write "<tr><td>CurCategory:" & CurrentCategory & "</td></tr>"
else
response.write "<tr><td>hello</td></tr>"
End If

Code:

View Replies View Related

If Statement

I am passing in values either customer id (key) or their names (name) from a form .
You don't have to use both the id and the name to search for the customer however I don't know how to do this!
If the keyform = "" then , use the name to find the customer
else
can't find it! this is what I have at the moment :

keyForm = Trim(request("key"))
name Form = Trim(request("name "))
Dim name , cyfeiriad, tref, sir, codpost, ebost, ffon, cyfrif, dyddiad
Set dnsSQL = g_con.Execute("SELECT key_user_accounts,name ,cyfeiriad,tref,sir,codpost,ebost,ffon,cyfrif,dydd iadcreucyfrif from cwsmeriaid Where key_user_accounts = " & keyForm & "
if not name = "" then and name = '" & nameForm & "'")
else ")
end if

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved