473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Display data with the same first letter on insert.

I have a customer information form that has a list box containing all the names of the customers. And when submitted and inserted to the database, automatically displays the information onto the list box. I want to be able to display data that starts with the first letter of the last name.

For example, if I input john smith, all customers with last names starting with 's' will be displayed. in the list box.

How can it be done? Please help.
Dec 5 '07 #1
2 1483
u should have two tables having 1st name and 2nd name then from 2nd table u can use SELECT * FROM Persons WHERE FirstName LIKE 's%', so it'll retive all the record starting with "s",



hope it'll work 4 u

good luck, keep experimenting
Dec 5 '07 #2
u should have two tables having 1st name and 2nd name then from 2nd table u can use SELECT * FROM Persons WHERE FirstName LIKE 's%', so it'll retive all the record starting with "s",



hope it'll work 4 u

good luck, keep experimenting
what if I use a variable? how could I compare the first letter of the string variable?

Something like:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM Persons WHERE FirstName LIKE '$fname'.'%'
Dec 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joey | last post by:
Say a customer inserts into a sql database field (NUMINSERTS) the number 6. On the following page, I want to build a table that displays 6 input boxes, since the customer said they wanted 6 text...
1
by: Gavin | last post by:
Hi, I would like to convert a dollar amount ($1,500) to represent Fifteen hundred dollars and 00/100 cents only for SQL reporting purposes. Is this possible and can I incorporate the statement...
5
by: Mel | last post by:
i want to have a block, like some articles i see, with the first char (very Fancy and huge) and have the rest of the block kind of wrap around this char (to the right of). something like below...
2
by: Corepaul | last post by:
As input is typed into a text box, I would like to search a recordset for the first record that matches what has been typed so far. I would like to update the text box to display the letters typed...
1
by: em_lom | last post by:
I have a simplelist of names that I got from the database. I have written all the names from the simple list to the screen. what I'm looking to do is the following: A-H I-P ...
1
by: ganesah | last post by:
hi there, i need to create a program to continously display the received binary data (2bytes) from COM 8 in a console, however I'm having problem in doing so where i do nt see any data being...
2
by: sathyan8294 | last post by:
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering...
3
by: Stonesifer21 | last post by:
So far I have a datagrid that can display data from Sql DB. I also have the edit, update, and cancel buttons working properly once the data is already in the database. I am having difficulty...
4
by: =?Utf-8?B?TWlrZSBE?= | last post by:
I read the CSV file into a DataTable. This is so I can fix invalid dates and other data I don't want in the database. Then I use SqlBulkCopy to insert the data into the SQL database. All the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.