I can get your expected results from the data you have given, as shown below:
sqlite> CREATE TABLE tst( name text ); sqlite> sqlite> insert into tst values( 'InternetGatewayDevice.DeviceInfo.' ); sqlite> insert into tst values( 'RubbishForTesting.DeviceInfo.1' ); sqlite> insert into tst values( 'InternetGatewayDevice.DeviceInfo.AdditionHardwareVersion' ); sqlite> insert into tst values( 'InternetGatewayDevice.DeviceInfo.SerialNumber' ); sqlite> insert into tst values( 'RubbishForTesting.DeviceInfo.2' ); sqlite> insert into tst values( 'InternetGatewayDevice.ManagementServer.' ); sqlite> insert into tst values( 'InternetGatewayDevice.ManagementServer.URL' ); sqlite> insert into tst values( 'RubbishForTesting.DeviceInfo.3' ); sqlite> insert into tst values( 'InternetGatewayDevice.ManagementServer.Username' ); sqlite> insert into tst values( 'InternetGatewayDevice.ManagementServer.DownloadProgressURL' ); sqlite> insert into tst values( 'RubbishForTesting.DeviceInfo.4' ); sqlite> sqlite> sqlite> select name from tst where name like 'InternetGatewayDevice.%'; InternetGatewayDevice.DeviceInfo. InternetGatewayDevice.DeviceInfo.AdditionHardwareVersion InternetGatewayDevice.DeviceInfo.SerialNumber InternetGatewayDevice.ManagementServer. InternetGatewayDevice.ManagementServer.URL InternetGatewayDevice.ManagementServer.Username InternetGatewayDevice.ManagementServer.DownloadProgressURL sqlite> sqlite> sqlite> select name from tst where name like 'InternetGatewayDevice.%' and name not like 'InternetGatewayDevice.%._%'; InternetGatewayDevice.DeviceInfo. InternetGatewayDevice.ManagementServer. sqlite> Rgds, Simon 2008/6/25 James <[EMAIL PROTECTED]>: > Hi, > I will read that. > But I want to know that is it possible to get the expected result? > Thank you. > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Simon Davies > Sent: Wednesday, June 25, 2008 3:57 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] NOT LIKE statement > > Hi James, > > I think the problem lies with your expectations. > > Read the section on the LIKE operator in > http://www.sqlite.org/lang_expr.html > > Rgds, > Simon > > 2008/6/25 James <[EMAIL PROTECTED]>: >> Hi, >> >> I execute the SQL statement [SELECT Name FROM tr069;] and get the result >> >> InternetGatewayDevice.DeviceInfo. >> >> InternetGatewayDevice.DeviceInfo.AdditionHardwareVersion >> >> InternetGatewayDevice.DeviceInfo.AdditionalSoftwareVersion >> >> InternetGatewayDevice.DeviceInfo.Description >> >> InternetGatewayDevice.DeviceInfo.DeviceLog >> >> InternetGatewayDevice.DeviceInfo.DeviceStatus >> >> InternetGatewayDevice.DeviceInfo.EnabledOptions >> >> InternetGatewayDevice.DeviceInfo.FirstUseDate >> >> InternetGatewayDevice.DeviceInfo.HardwareVersion >> >> InternetGatewayDevice.DeviceInfo.SoftwareVersion >> >> InternetGatewayDevice.DeviceInfo.Manufacturer >> >> InternetGatewayDevice.DeviceInfo.ManufacturerOUI >> >> InternetGatewayDevice.DeviceInfo.ModelName >> >> InternetGatewayDevice.DeviceInfo.ProductClass >> >> InternetGatewayDevice.DeviceInfo.ProvisioningCode >> >> InternetGatewayDevice.DeviceInfo.SerialNumber >> >> InternetGatewayDevice.DeviceInfo.UpTime >> >> InternetGatewayDevice.ManagementServer. >> >> InternetGatewayDevice.ManagementServer.URL >> >> InternetGatewayDevice.ManagementServer.Username >> >> InternetGatewayDevice.ManagementServer.Password >> >> InternetGatewayDevice.ManagementServer.PeriodicInformEnable >> >> InternetGatewayDevice.ManagementServer.PeriodicInformInterval >> >> InternetGatewayDevice.ManagementServer.PeriodicInformTime >> >> InternetGatewayDevice.ManagementServer.ParameterKey >> >> InternetGatewayDevice.ManagementServer.ConnectionRequestURL >> >> InternetGatewayDevice.ManagementServer.ConnectionRequestUsername >> >> InternetGatewayDevice.ManagementServer.ConnectionRequestPassword >> >> InternetGatewayDevice.ManagementServer.UpgradesManaged >> >> InternetGatewayDevice.ManagementServer.KickURL >> >> InternetGatewayDevice.ManagementServer.DownloadProgressURL >> >> >> >> And I execute the SQL statement [SELECT name FROM tr069 WHERE name LIKE >> 'InternetGatewayDevice.%' AND name NOT LIKE > 'InternetGatewayDevice.%.[1-9]' >> AND name NOT LIKE 'InternetGatewayDevice.%.[^1-9] ';] and expect to get > the >> result [InternetGatewayDevice.DeviceInfo.] and >> [InternetGatewayDevice.ManagementServer.]. >> >> But I still get the above result. I don't know where the problem is. >> >> Could someone tell me ? >> >> Thank you. >> >> >> >> James Liang >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users