Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


retrieve from SQL Server Using ASP

Posted on 1999-07-04
Medium Priority
Last Modified: 2010-04-09
currently, i created a page for user to select a alphabet (A-Z), then i want to get all the members name which start with the key-in aplhabet
i'd tried using SQL command to retrieve it,but nothing came out
tempalpha = request.form("alpha")
sSQL = "Select * From IMAGE1 where emp_id like '"
sSQL = sSQL & tempalpha% & "'"
is that correct...after it couldn't worked i try this
i changed tempalpha% to tempalpha_...
but the same result came out,
pls help me
Question by:WeeKeong
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

siabod earned 40 total points
ID: 1851552
The percentage should be within the string, is the value tempalph a variable ? then the string should be :
sSQL = sSQL & tempalpha & "%'"

If tempalpha is the begining you'd like to search for physically then the string would be :
Select * From IMAGE1 where emp_id like 'tempalpha%'

but i guess seeing the name that it is a variable ;-)

Hope it helps you.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question