Hello,
If I have a field in a table which will have values like "2.2.2", I
want to do a SELECT rows WHERE field "HAS 3 DOTS",
AND,
a SELECT rows WHERE field "starts with 2.2" but could be anything after
that - simply put, a "2.2*", in shell terms.
How do I do these two? How must I structure the data in the field? Any
special requirements/anything that MySQL makes life easy for, for the
delimiters?
Thanks. 2 1242
Hi,
the wildcard for a single character is an underscore ( _ ) and for zero to
many characters it's the % sign.
So, e.g.:
select rows from table where field like '_._._'
or
select rows from table where field like '2.2%'
should work for you.
Markus Markus Popp wrote:
Thanks TONS, mate! :) You don't know HOW much you've helped me! :))
Thanks! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brittany |
last post by:
can someone explain to me what if else staments do and what while statements
do.
|
by: Bengt Richter |
last post by:
ISTM that
@limited_expression_producing_function
@another
def func(): pass
is syntactic sugar for creating a hidden list of functions. (Using '|' in place of '@'
doesn't change the picture much (except for people whose tools depend on '@' ;-)).
I.e., (not having the source or time to delve) the apparent semantics of the above
is something roughly like
|
by: Steven Bethard |
last post by:
I thought it might be useful to put the recent lambda threads into
perspective a bit. I was wondering what lambda gets used for in "real"
code, so I grepped my Python Lib directory. Here are some of the ones I
looked, classified by how I would rewrite them (if I could):
* Rewritable as def statements (<name> = lambda <args>: <expr> usage)
These are lambdas used when a lambda wasn't needed -- an anonymous
function was created with...
|
by: Jonathan Fine |
last post by:
Giudo has suggested adding optional static typing to Python.
(I hope suggested is the correct word.)
http://www.artima.com/weblogs/viewpost.jsp?thread=85551
An example of the syntax he proposes is:
> def f(this:that=other):
> print this
This means that f() has a 'this' parameter, of type 'that'.
And 'other' is the default value.
|
by: ben |
last post by:
this programme from sedgewick's 'algorithms in c parts 1-4' "is a
sample client program that ... uses a symbol table to find the distinct
values in a sequence of keys (randomly generated or read from standard
input), then prints them out in sorted order."
#include <stdio.h>
#include <stdlib.h>
#include "item.h"
#include "st.h"
| |
by: mabond |
last post by:
Hi
Is it possible to compare a vaule for a select case statement using a
wildcard.
e.g. somthing like
Select case myValue
case like "*ing"
end select
|
by: nephish |
last post by:
Hey there,
i have been learning python for the past few months, but i can seem to
get what exactly a lamda is for. What would i use a lamda for that i
could not or would not use a def for ? Is there a notable difference ?
I only ask because i see it in code samples on the internet and in
books.
thanks for any clarity
sk
|
by: BlackJack17 |
last post by:
I have another newbie question for you guys... I apologize in advance for how simple it is...
I've got a string of data, included in that string is 11* as it appears, the * is not a wildcard. I'm using the function
Like "*" & "11*" & "*" to find any records that have "11*", again, the * is not a wildcard. But it's interpreting it as a wildcard, so I'm getting 1105 and 11X and so on. How can I change the formula so that it will return...
|
by: Steven D'Aprano |
last post by:
I have a class which is not intended to be instantiated. Instead of using
the class to creating an instance and then operate on it, I use the class
directly, with classmethods. Essentially, the class is used as a function
that keeps state from one call to the next.
The problem is that I don't know what to call such a thing! "Abstract
class" isn't right, because that implies that you should subclass the
class and then instantiate the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |