Hi guys,
I'm using a field in a table to hold information about varios checkboxes (60).
The field is parsed to a string to something like this
"0,0,0,1,0,1,0,1,..."
Now I want to make a search using a similar string to match the fields. I.e.
"?,?,1,?,?,1,..."
where the "?" means that it must be 0 or 1 (doesn't matter), but the "1...
"[" is not classed a unicode character http://en.wikipedia.org/wiki/List%5Fof%5FUnicode%5Fcharacters (my guess) as to why this wouldn't work:
declare @v nvarchar(255)
set @v = '[x]825'
select 1
where @v like '[x]825'
Ta!
...
Hi guys.
I have a SQL query SELECT * FROM table WHERE column LIKE '%pdd%'.
The problem is I need to get all results excluding those which start with "pdd", I mean find everything where "pdd" is not at the beginning. How could it be done?
Thank you.
UPD. Sorry, I should've clarified my question a little bit more. I do need to match "p...
Hey
I have been trying to get this working for quite a while now but it just doesn't seem to work, maybe it is is not even possible, what i am wanting to do is to perform a mysql join query using like, such as this example i found...
SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE '%' + Table2.col + '%'
but it just doesn't ...
How can you use mysql and the like/wildcard syntax across multiple tables, would it be as simple as:
(SELECT * FROM `table1` WHERE `name` LIKE '%tom%') AND (SELECT * FROM `table2` WHERE `name` LIKE '%sam%')
Not tested, just thinking about it.
...
I am using excel 2003 to connect to SYBASE database using VBA recordset. I want to filter the records.
Following is code I have used.
Dim rset As New ADODB.Recordset
rset.Open sQuery, m_db, adOpenForwardOnly
rset.Filter = "Name NOT LIKE 'Dav%'"
rset.Requery
But it is not working and returning all rows. If I use Name LIKE 'Dav%', its ...
I am having some issues while using the TableAdapter and the LIKE Statement in VB 2008. I am wanting to search name using partial spellings. When I run the application nothing is returned.
Here is my SQL:
SELECT MEMBERS.RolodexID, MEMBERS.FirstName, MEMBERS.LastName, MEMBERS.address, MEMBERS.Address2, MEMBERS.City, MEMBERS....
I am trying to assemble the following SQL statement using python's db-api:
SELECT x FROM myTable WHERE x LIKE 'BEGINNING_OF_STRING%';
where BEGINNING_OF_STRING should be a python var to be safely filled in through the DB-API. I tried
beginningOfString = 'abc'
cursor.execute('SELECT x FROM myTable WHERE x LIKE '%s%', beginningOfStrin...
Hi
I have some problem regarding the search in mysql.
Below is my query.
SELECT * FROM table WHERE name LIKE "%admin\'s%";
When i am executing this query it will return zero data.
actually i have "admin\'s" stored in db. this "\" is to prevent sql injection. i have used mysql_real_escape_string to prevent the sql injection.
but wh...
When i use . operator in like operator query is not selecting any of the records.
here is my query. how to use " . " in LIKE .
SELECT * FROM XSP_AssetList_V WHERE AccountID = '5d6b1eab-1697-de11-a2d1-00505617006d' AND PrinterSerialNumber LIKE '%13.12%'
...
how to select two record from two different table with one query in mysql??
for a search query im using
$search = $_GET['gd']
$arama_sonuc = mysql_query("select * from mp3 where baslik like '%$search%'");
well its ok. it shows me results from mp3 table. but with same query i need to search something on HABERLER table too.. how can i ...
Hi,
I have a database which contains 5 fields, which are: name, address, idcard, town, street
I then have a PHP query which accepts one parameter. In this parameter, you can enter whatever fields you like and the results must still be accurate.
For example, if I enter john doe skate street in the search box you will get all the record...
I've got a field in my table for tags on some content, separated by spaces, and at the moment I'm using:
SELECT * FROM content WHERE tags LIKE '%$selectedtag%'"
But if the selected tag is 'elephant', it will select content tagged with 'bigelephant' and 'elephantblah' etc... How do I get it to just select what I want precisely?
Thanks...
For whatever reason I have these classes called .main_sub1, .main_sub2 etc. Never mind why I can't have .main .sub.
Is there a way with JQuery, sort of in the way it is possible to do with attributes, to get the classes containing main?
...
Hello!
Can I create a new table with an old table's autoincriment status in mysql client?
I think, that ALTER TABLE new_table_name AUTO_INCREMENT=@my_autoincr_iment helps me, but this construction must use with a constant value.
I don't wanna use a difficult script.
Drochite na carmu!
...
This gives the correct result
select name_en,address_new,ddress2_new,unique_id
from mumbaipropertydetails
where mumbaipropertydetails."zone"='\\u092E\\u0928\\u092A\\u093E \\u092D\\u0935\\u0928';
but if I use like it does not
select name_en,address_new,ddress2_new,unique_id
from mumbaipropertydetails
where mumbaipropertydetails....
I would like to use something like the following:
SELECT city FROM cities WHERE city LIKE %D% AND country_id = '12'
...
Query #1:
SELECT DISTINCT `title`
FROM `table`
WHERE (
`title` LIKE '%this is search%'
)
OR (
`title` LIKE '%this%'
AND `title` LIKE '%is%'
AND `title` LIKE '%search%'
)
OR (
`title` LIKE '%this%'
OR `title` LIKE '%is%'
OR `title` LIKE '%search%'
)
LIMIT 0 , 10
but not works good , and when I try splited this sql:
Query #2:
SELE...
I am trying to select data from two tables and insert it into another one. I want to select the data when certain things match in each table. The problem is that one of the comparisons needs to be a like and I am at a loss. The sql statement is below and I believe that it will at least show what I am trying to do.
insert into hr_numb...
hi there
i have 3 tables for tags, tag categories and used tags. i'm wanting to get a list of all tags with a count of the used tags (the format of the tags used is comma separated values for each document id that has tags).
i've been trying something like this but I can't get the value of the tags.tag field to be inserted into the LIK...