On Wed, Aug 25, 2010 at 10:07:54AM -0500, P Kishor scratched on the wall: > On Wed, Aug 25, 2010 at 10:05 AM, Ted Rolle Jr. <ster...@gmail.com> wrote: > > I have a table of UPCs with lengths varying from 6 to 12. ?I'd like to > > print those with length=10 to a file for printing. > > SELECT * > > ?FROM UPCs > > ?WHERE LENGTH(UPC)=10; > > works just fine. ?But when I export the table I naturally get the whole > > table. ?Would a View help here? ?Or create a temporary table. > > I believe there's a simple solution, but it eludes me. ?For now. > > in the sqlite3 shell, set output mode to file,...
...via the ".output <file>" command... > ...and then select as > above. All your select output will go to your file. You can also modify the format of the output using the .mode command. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users