Distinct Phone Numbers With SQL
I will attach a zipped file with data in it. I want to pull distinct phone numbers from column B and column D (as some of the numbers will be the same). then rank by asc order based on TotalCashPrice. If they are the same, I want to compare the TotalCashPrice to TotalCashPrice2. Is that possible?
View Replies
ADVERTISEMENT
I have seen other poster's solutions to this question, but cannot make heads or tails of it so I thought maybe someone could answer my question specifically. On an ASP Details page, I have dynamic text with a company's address, phone and fax numbers. I want the phone and fax numbers to be formatted like (###) ###-#### on the screen. They are entered in MS Access in 10-digits only with an input mask to format them in Access.
I am using DWMX 2004 and am not a programmer or coder by any means. I create my recordsets in DWMX in simple mode, so if you can help me, please be specific. My field names are MbrMainPhone and MbrFax if that helps.
View Replies
View Related
If I want my phone number like this...
(XXX)XXX-XXXX
([0-9]{3})[0-9]{3}-[0-9]{4} ....
View Replies
View Related
I need to generate three random numbers between 1 and 100, but they need to be different.
e.g. 3,43,88 would be fine but 5,76,76 would not.
The function I have to generate a single random number is:
function funRandomNumber(intHighestNumber)
randomize
funRandomNumber = int(rnd * intHighestNumber) + 1
end function
called by: funRandomNumber(100)
Can anyone see how this can be modified to do what I need?
View Replies
View Related
I'm working on asp project, access 2000 at backend.I can write arabic text and arabic
numbers in textbox and save them in database.but if i see these records, arabic text and arabic numbers,it is ok,if my computer is arabicenable.
If my computer is not arabic enable then it show arabic number into english numbers.
how can i show arabic numbers instead of english numbers if my computer is not arabic
enable.i'm working on a project i have to complete it.How can i convert english numbers that are coming from database and convert that numbers in arabic for show.
I have use
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
I shall be very thankful to you for this purpose.
View Replies
View Related
if someone enters phone number like this:
7209080987
i want to change it to
720-908-0987
but if someone has already entered the phone number in this way 720-908-0987
then dont make any changes
i am running into the problem to check in which way the phone number was entered 720-908-0987 any idea how i can check and make the change.
View Replies
View Related
Does anybody know if there is a function in ASP to display a phone number in this format xxx-xxx-xxxx ?
View Replies
View Related
Our application tracks contact information. One of our clients, a car
dealership, has asked about being able to enter a lastname and phone number
and getting as much of the main form filled out as possible, "Hi, thanks for
stopping by Demaux Motors. Before we get started, can I get your phone
number, please? Oh, HI Joe, you still live on Gingerbread lane..?" etc etc
etc. Filling out the form is easy - sql query, javascript, blah blah blah -
getting the data is another. My question is three-fold:
1: I know that if you go to Google and type a phone number, you'll get a
query result back with address, city, state, etc. The documentation for the
Google APIs are written for .NET...anyone have any experience with those
APIs in classic ASP?
2: Is there some other service that provides this same functionality?
View Replies
View Related
I've been messing around with this for a while now and can't figure it out. I'm trying to use this code to pull a person's phone number out of a database:
<%
call GetAddrInfo ("BenPhone_v",datavalue)
if datavalue = TRUE then
%>
<%call GetAddrInfo ("BenPhone",datavalue)%>
Phone Number: <%=datavalue%>
<%end if%>
What it returns is an unformatted phone number (ie: 5555555555) Nothing I've tried will format the number. I think the problem is the code that's being used to retrieve data from the database, but I'm not sure: Code:
View Replies
View Related
I run an eCommerce site and I have a checkout form that requests the customers phone number. I have it set up as one whole field, not broken up: 3,3,4 - too hard to re-work. Therefore a customer is free to enter anything:
(987) 555-1234
9875551234
(9875551234
etc.
I want to format the phone number before it is saved to the database in the following format:
987-555-1234
Basically, I need to strip the number of everything except the numbers and then add a "-" after the 3rd and 6th number?
View Replies
View Related
I have created an MS-Access DB that holds data items including phone number and currency. Utilzing the input mask function in MS-Access, and using Access to input data, keeps the data looking clean, i.e. $5,678.32 and (555) 555-1234. When I read this information from an ASP page into my repeatable region table (I'm using Dreamweaver btw), the data is displayed as 5678.32 and 5555551234. How can I format the data on my displayed ASP page to be formatted as currency and a proper phone number mask?
View Replies
View Related
i am trying to format a telephone number (returned from the database as digits, no hyphens) to include hyphens. the database field is set as char with a length of 10. when i run the following code, i get a type mismatch error.
Private Sub formatDN(strTele)
'Changes a Telephone to a recognizable format
if Len(strTele) = 10 then
strFormatted = "(" & mid(strTele,1,3) & ") " & mid(strTele,4,3) & "-" & mid(strTele,7,4)
response.write strFormatted
Else
response.write strTele
End if
End Sub
'section of code that calls the function
HTML = HTML & "" & adoRSWEBtest(0) & " (" & adoRSWEBtest(1) & ") <br>" & formatDN(adoRSWEBtest(2)) & "<br><br>"
View Replies
View Related
i have a phone field in one of my tables. the data is pretty ate up. there's some numbers with .,- and extra spaces among other things. how can i do a mass update i would like to have all the phone numbers formated like this 555-555-5555 .
View Replies
View Related
I have a database column that contains phone number information, but it has no delimeters (5555555555 instead of 555-555-5555). How can I add them?
View Replies
View Related
I'm looking for a way to send a text message to a nextel phone using asp. I tried some of my scripts,in the recipient field I included my email ("myemail.domain.com") and ("1234567@messaging.nextel.com").
the messsge was successfullysent to my email but failed in the nextel email. Also when I send the message through groupwise (our mailing system) the message to nextel goes through with no problem.
View Replies
View Related
I got this so far.But I need the user to be able to enter a space, a () and a dash into the field. ASP Code:
if studentphone="" or not IsNumeric(studentphone) then
lvValid=0
lvstudentphone="<font color='#CC0000'>"&lvstudentphone&"</font>"
end if
View Replies
View Related
I need to open client phone dialer from my asp page that contains phone number and fill phone number automatically when dialing. What should I need to start about this?
View Replies
View Related
I have a situation where I need to send a text message to a cell phone. Any ideas?
View Replies
View Related
Anyone attempted this one yet using ASP? I've found a few PHP scripts, but nothing in ASP. Basically looking for this:
1. User takes a picture on their cell phone
2. User emails picture to statis email address on my site
3. Image is uploaded to my server
4. Image is displayed for others to see
View Replies
View Related
I have a Drop Down box that is being populated using the SQL Distinct
command. How do I get it so it doesn't show Null values?
Here is my SQL statement
sSQL = "SELECT DISTINCT Title FROM Everyone ORDER BY Title ASC"
View Replies
View Related
this is my query
SELECT distinct(prof.id_num),prof.name,education.educ_lev el,education.school,education.degree,agency_info.c ampus
FROM prof inner join education on prof.id_num=education.id_num inner join agency_info on education.id_num=agency_info.id_num where education.educ_level<>'course' and agency_info.campus='colle'
ORDER BY education.school
course="tertiary"
still it shows duplicate records. it displays secondary,primary record of the employee
View Replies
View Related
When I just - SELECT DISTINCT atblProducts.ID AS ProductID, it selects distinct Product IDs but when I add other columns to the select, it doesn't select the ProductID as DISTINCT.
I've heard to try "GROUP BY..." Code:
View Replies
View Related
I want to use a distinct and a top in a select statement, however I
want the distinct to only apply to one of the columns. For example
SELECT DISTINCT TOP 15 col1,col2,col3,col4 from table1
I only want the distinct to apply to say col2. Is there a way to do
this?
View Replies
View Related
I am trying to draw out from the database a distinct artists in relation to a variable which is 'cat'.
strsql = "SELECT distinct art_Artist, cat_ID, art_Category, art_Title, art_BDescription, art_Price, art_PicFull " &_
"FROM eventDisplay WHERE art_Artist='" & cat & "' "&_
"ORDER BY art_Artist"
Whats happening is that at this moment cat = Lee Jones, and he is in the databse three times with exactly the same info except for one subject which doesnt matter in this case, therefore we only need to see his name once being pulled.
Im sure this code has worked before but it doesnt seem to be workign here, i thought maybe its because his name is entered into the database with a gap inbetween his first name and last, but im probably wrong...
View Replies
View Related
I have information in a database with the following structure:
3 Divisions - each division has several districts. Each district has several regions and each region has several areas.
I have a recordset of every area with the region, district and division they belong to.
I have 4 drop down menus on my page - area region, district and division.
How can I filter my recordset before each dropdown, so it only has DISTINCT records
View Replies
View Related
Here is the code that just won't work
Set rsPlayers = cnnDB.Execute("SELECT DISTINCT Players.PlrEmail FROM Players INNER JOIN Sessions ON Players.PlrID = Sessions.SsnPlrID WHERE Sessions.SsnGmID = 14 AND Players.PlrEMail <> 'Unknown' ")
If I use SELECT * From Players I get duplicates. I only want unique emails for the query.
View Replies
View Related
How can I make this inner statement distinct? I've got the coding as follows but it displays every record anyway. Any way around this?Code:
sql = "SELECT DISTINCT cheats.*, searchtable.title FROM cheats, searchtable WHERE cheats.pin=searchtable.pin"
Set rschancheats = Server.CreateObject("ADODB.Recordset")
rschancheats.Open sql, conn, 3, 3
View Replies
View Related
i have a DB with table named Products. pCategory lists several names of teams of varing leagues (NBA, NFL, MLB, etc...) I want a table to display only the NBA teams. I have a field named pGroup which has NBA, MLB, etc... for each team. How can I display all fields where pGroup="NBA." I thought the code would work below, but it didn't.
<%sql_getProducts = "SELECT DISTINCT pCategory WHERE pGroup="NBA" FROM products"
View Replies
View Related
I am building a real estate listingwhere the vistor choses a city or cities and the results display the counties they are in. The problem I have encountered is that
I am trying to make search results from a query that displays the county only once even if the visitor has chosen many cities within the same county.
I problem is that when the county field is set to be distinct, the recordset pulls out only the first record of that group. Therefore, when a search is performed on that query it will not find a potenial county even if the city belongs to that county.
View Replies
View Related
I'm trying to get this SQL statement to work:
SQL = "SELECT distinct(catagory) FROM PicAlbum ORDER BY dateadded"
I keep getting this error:
ORDER BY clause (dateadded) conflicts with DISTINCT
Is it possible to do a ORDER BY using a distinct?
View Replies
View Related
I have a table containing newsletter articles. Each article has a zone which is either a section, division, district or all, and a edition they belong to.
I have the following sql statement in my vbscript to give a list of newsletter edition dates if there are articles relating to the relevant section, division or district:
"SELECT DISTINCT (edition) AS editions, zone FROM t_newsletter WHERE ((zone='"+sec+"') OR (zone='"+dis+"') OR (zone='"+div+"'))"
the trouble is that if there is an article in november for the relevent section and also an article for the relevant district then that date appears twice - how can I stop this, or do I need to go into my database?
View Replies
View Related
How can do double select or do I have to loop though? I would like to go an strSQL = * From main but I only want to have one person from each team in week x, team being a field. I could select distinct teams then loop and simply only Do while once per team however I'd like to put it all together but of course
Select Distinct TEAM Where Week = vweek
can not be done. Any ideas. I saw some thing about being able to have a second statement underneath in [] once but was I dreaming?
View Replies
View Related
I have my piece of code like that...everything is working nice but when i retrieve values from the database, the DISTINCT part does not seem to work... Code:
View Replies
View Related