General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Select not returning expected answer
Question...
With these tables (Fox2.6 cursors) and these data, why doesn't this select return any records for Client_no 111-00-1296
SELECT v12Clients.*, ;
vProfiles.Profile_no, ;
vProfiles.Date_Enter, ;
vProfiles.Profauthnm ;
FROM v12Clients, vProfiles ;
INTO TABLE SYS(2023)+"\NeedMini.DBF" ;
ORDER BY v12Clients.Client_no, vProfiles.Date_Enter DESCENDING, vProfiles.Profile_no ;
WHERE UPPER(ALLTRIM(vProfiles.Client_no)) == UPPER(ALLTRIM(v12Clients.Client_no))
Structure for table: c:\temp\00861482.tmp
Number of data records: 392
Date of last update: 06/29/1900
Code Page: 1252
Field Field Name Type Width Dec Index Collate
1 CLIENT_NO Character 15
2 PROFILE_NO Character 11
3 DATE_ENTER Date 8
4 PROFAUTHNM Character 30
** Total ** 65
Structure for table: c:\temp\00861477.tmp
Number of data records: 6
Date of last update: 06/29/1900
Memo file block size: 64
Code Page: 1252
Field Field Name Type Width Dec Index Collate
1 CLSEQNUM Character 16
2 CLNUMBER Character 15
3 CLCMPNY Character 40
73 CLIENT_NO Character 15
74 USAGE Numeric 10
** Total ** 871
V12Clients.Client_no
'11-00CVG ' (1 entery, record number 1)
'11-17-159-1 ' (1 entery, record number 2)
'11-9 ' (1 entery, record number 3)
'111-00-1285 ' (1 entery, record number 4)
'111-00-1296 ' (1 entery, record number 5)
'111-00-1302 ' (1 entery, record number 6)
vProfiles.Client_no
'11-00CVG ' (377 enteries, record numbers 1-377)
'11-17-159-1 ' (3 enteries, record numbers 378-380)
'11-9 ' (3 enteries, record numbers 381-383)
'111-00-1285 ' (2 enteries, record numbers 384-385)
'111-00-1296 ' (3 enteries, record numbers 386-388)
'111-00-1302 ' (4 enteries, record numbers 389-392)
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only