473,387 Members | 1,504 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,387 software developers and data experts.

Pass Parameters to select Query

Hi,
I am writing a query to get data from the SQL server 2005,
i am having a record in the database but i am getting null records can any one help me regarding this i am posting the query below..
do i need to remove special charecters while quering or what way i can get the result.

SELECT ItemName FROM OITM WHERE
ItemName = 'Twinkle Twinkle. English 1–4'
Aug 17 '07 #1
2 1741
azimmer
200 Expert 100+
Hi,
I am writing a query to get data from the SQL server 2005,
i am having a record in the database but i am getting null records can any one help me regarding this i am posting the query below..
do i need to remove special charecters while quering or what way i can get the result.

SELECT ItemName FROM OITM WHERE
ItemName = 'Twinkle Twinkle. English 1–4'
It looks OK. One question is the dash between 1 and 4; is it a "minus sign" or a (longer) "dash"? I suggest you try
Expand|Select|Wrap|Line Numbers
  1. SELECT ItemName FROM OITM WHERE 
  2. ItemName like 'Twinkle %'
  3.  
and see if the record comes up then expand the like clause.
Aug 17 '07 #2
Please try the following queries:

Depending on your requirement of the output


SELECT ItemName FROM OITM WHERE
ItemName LIKE 'Twinkle%'


SELECT ItemName FROM OITM WHERE
ItemName LIKE '%English 1–4'

Aash.
Aug 17 '07 #3

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

Similar topics

4
by: Corey | last post by:
All, I am relatively new to XML and I have what may sound like a dumb question. I want to pass a query string variable to my xml document and filter the output based on that variable. For...
2
by: Robert | last post by:
when using the following function to create a pass through query is there a way to set the query property, "Returns Rows" to no. The default is yes. Since we are planning to create the pass...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
3
by: Zlatko Matić | last post by:
Hello. I'm wondernig what is happennig whith saved pass-through queries nested in regular JET query if regular JET query just filtrates result by start/end date...Does pass-through query first...
0
by: Zlatko Matić | last post by:
Hi everybody! Recently I was struggling with client/server issues in MS Access/PostgreSQL combination. Although Access is intuitive and easy to use desktop database solution, many problems...
1
by: Mayhem05 | last post by:
I have an Access 2003 database that I need to write some VBA code for to populate a table. The table is based on a query I have built in Access queries. Right now I have 2 parameters that are...
3
by: epfmy | last post by:
Hi I want to ask... A report is using a query as record source. That query has parameters and . A command button in a form open that report. That form contains 2 textbox for date. How...
1
by: alphaomega3 | last post by:
I need to add the parameters and to an SQL Pass-through query. Currently my SQL is as follows: SELECT POORDHDR_SQL.ord_no AS 'PO Number', TIMEDIM_SQL.BusinessDate AS 'PO Issue Date',...
3
by: Tim Sprout | last post by:
I want button1_Click on Form1 to send a query using the textBox1.Text string as part of the query. I want to populate a dataGridView from an Access database file. I am trying to build a search box...
2
by: gumby | last post by:
I would like to call this stored procedure, but I am unable to pass parameters to the @Start and @End. Is thier a way to pass parameters to a pass through query from MS Access? SELECT ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.