473,507 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comparaison dans une seule table

Bonsoir à tous,

Hypothèse : 1 table, 4 champs : VilleA, VilleB, CPA, CPB.

Objet : extraire toutes les lignes de la table dont les 2 premiers
chiffres de CPA sont égales aux 2 premiers chiffres de CPB.

Merci par avance pour vos suggestions.
Nov 12 '05 #1
1 1700
While I can read French OK, I don't think I can write back in French, so
I hope English is OK with you.

Are your CPA fields number or text?

If text, try:

select * from LeTable where left(CPA,2) = left (CPB,2)

If number, you will need to convert the number to a string and then use
the LEFT function as above, perhaps like:

select * from LeTable where left(CStr(CPA),2) = left (CStr(CPB),2)

Hope this helps,

Anne

Arthemus wrote:
Bonsoir à tous,

Hypothèse : 1 table, 4 champs : VilleA, VilleB, CPA, CPB.

Objet : extraire toutes les lignes de la table dont les 2 premiers
chiffres de CPA sont égales aux 2 premiers chiffres de CPB.

Merci par avance pour vos suggestions.


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6268
by: Agathe | last post by:
Bonjour, Je souhaite insérer dans une table MySQL des données provenant d'un fichier texte grâce à un script PHP. Mon fichier porte l'extension "txt" et les données sont séparées par des ";'. ...
3
2794
by: Raymond H. | last post by:
Bonjour, Est-il possible d'exécuter seulement un msgbox dans l'événement clik d'une ToolBar mais sans que le bouton en question (de la ToolBar) ne s'enfonce mais reste normal sans enfoncement ?...
1
2520
by: eXistenZ| | last post by:
Bonjour, je suis entrain de recupérer des données a partir d'une table; et je mets ces données là d'un un tableau, puis j'essaie de mettre le contenu de ce tableau ds une table; le pb c'est...
3
2832
by: Chris | last post by:
function Main(param) { alert("test "+param); <<<<<<<<<<< Ici tout se passe bien : le contenu de param est bien affiché fchaine='' .... +'<div ><a href="#" onclick="javascript:return...
9
1648
by: nicolas.hilaire | last post by:
Hi all, i need to choose a langage for porting my vb application to dot net 2.0 in november. For some components, low-level components, i want to know if it can be better to use specific .net...
2
1371
by: Amoula100 | last post by:
Bonjour Je veux pouvoir gontrôler la navigation dans les tables enfants dans ma DataGrid, c'est à dire je veux acceder aux données de la table enfant pour des lignes spécifiques et pas pour...
23
2062
by: Rogers | last post by:
I want to compare strings of numbers that have a circular boundary condition. This means that the string is arranged in a loop without an end-of-string. The comparaison of two strings now...
4
2564
by: icony | last post by:
Bonjour, je veux faire une requête qui selectionne seulement les mots qui contiennent disons "afe" Le problème est que je voudrais que cette partie de mot provienne d'une table qui change de...
0
7223
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
7111
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
7319
Oralloy
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,...
0
7376
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...
0
7485
tracyyun
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...
1
5042
isladogs
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...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.