Autor Beitrag
raiha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 152



BeitragVerfasst: Di 31.05.05 10:24 
Hi,

in SQL gibt es für belibige Zeichen in der WHERE Bedingung das Jokerzeichen %.
Wie lautet das für einen Integer Wert in der Where Bedingung?

Danke Rainer
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.05.05 11:04 
Gibt es meines Wissens nicht.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 31.05.05 11:24 
was bewirkt denn so ein Jokerzeichen ?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.05.05 11:32 
In Verbindung mit einem "like", wirkt es wie der "*" bei einer Dateisuche.
bockwurst
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 191

win98 /XP
D1 D5 Prof DE2005PE
BeitragVerfasst: Di 31.05.05 14:08 
hallo,
eine Möglichkeit wäre, deine Integer Zahl in der Datenbank als String abzulegen. D.h. der Typ soll String sein. Dann kanst du mit % und _ leicht suchen. So weiß ich leider auch nicht.

Lg. Andreas
OlliWausD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 212

Win 2000/XP
Delphi 5 Professional - Interbase/Firebird
BeitragVerfasst: Do 02.06.05 10:58 
also bei Firebird funzt das einwandfrei

wenn du z.B.: alle Kundennummern ausfiltern willst, die mit einer 2 beginnen, einfach

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
select
  kunden.nr
from
  kunden
where
  kunden.nr like '2%'


und fertig

mfg

OlliW

_________________
Take it easy