Subject Re: Copying text...
From Charlie <trainman@traincity.com>
Date Tue, 21 Jun 2016 09:36:51 -0400
Newsgroups dbase.getting-started

Hi Mervyn,

Believe it or not since I had some problems with oodml, I actually have this running in xdml.  I used a simple loop and now it works great.  The loop takes around 20 seconds which is a little longer than your version.  I got almost all of the Lionel done and everything else except for Marx done yesterday.  

I should be able to figure out the font and other html detail soon.

So what this program that you have introduced me to has done.  It used to take me at least an hour per page.  Now it will take me less than fifteen minutes to do everything once the data is organized.

I will at some point try to get this into oodml as I know that is what it is intended for.

Charlie




Mervyn Bick Wrote:


> On 21/06/2016 00:27, Charlie wrote:
> >> If this produces a temporary table with the year and price without
> >> decimals I'll change the two programs for you.
> >>
> >>
> > That's OK.. It works great.  I am overwhelmed with happiness!!  Thanks very much!!! Will save me mucho timeo!!! (And I learned some stuff!!!)
> >
>
> It took a while but at least we got there.  :-)  The only thing you
> still need to do is to sort out the selection criteria for American
> Flyer, Marx and Lionel sub-section price lists.  It should be quite
> straightforward but it may take a while as there are 43 to do.  Although
> they will be different many of them will probably be similar with only
> the value to match being different.  If this is the case you should be
> able to do most of the heavy lifting by copying and pasting and then
> just changing the search value.
>
> The program make_temp_tables.prg now creates tables with the fields
> part_no, title, grade, yr and asell1.   Yr and asell1 contain integer
> values.  The part_no field is only used to order the temporary table and
> it is not used to create the HTML file.  You can, therefore, continue to
> use your original XDML code to produce temporary tables while you sort
> out the selection criteria for make_temp_tables.prg.  You will, however,
> need to ensure that you use the name for the temporary file as given in
> the attached table list1 and you will need to use title, grade, yr and
> asell1 as the fieldnames.  Yr and asell1 must be integers.  You may need
> to change the data type for these fields in your temporary file to LONG
> to get rid of the decimal point values in these fields when the HTML
> file is generated.
>
> make_lists.prg has been changed so that it only creates the HTML file if
> the appropriate temporary file exists.  You can, therefore, make the
> temporary files using a combination of make_temp_tables.prg and your old
> code.  Each temporary file is deleted after the HTML file s created.
>
> The HTML file names will have mb as a prefix.  A global replace to
> change ("mb to (" in make_lists.prg will get rid of the prefix.
>
> If there is only one temporary file, only one HTML file will be created
> by make_lists.prg so you can create your price lists one by one as you
> did in the past if you want to.  Once you have sorted out the selection
> criteria for make_temp_tables.prg though you will be able to create all
> your price lists literally in seconds by running the two programs in
> sequence.
>
> make_temp_tables.prg will create 5 tables until you sort out selection
> criteria for the rest.  How long does it take to run and how long does
> make_lists.prg take to run?  From these figures you will be able to get
> a good idea of how long it will eventually take to create the 48 price
> lists.  It has got to beat doing them one by one. :-)
>
> Mervyn.
>
>
>
>
>
> function make_html_pricelist(cFile,cListname,cTable)
>    nEndYear = 1900 //year(date())-5
>    cGendate = dtoc(date())
>    f = new file()
>    f.create(cFile)
>    f.puts('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">')
>    f.puts([<HTML>])
>    f.puts([<head>])
>    f.puts([<title>Free Electric Train Price Guide</title>])
>    f.puts([<meta name="description" content="Electric Train Price Guide">])
>    f.puts([<meta name="keywords" content="price guide, electric train price guide, train price book, trains, electric, tinplate, toy train set, miniature railroad, pre war, american flyer pre war, american flyer o gauge, american flyer 3 rail, american flyer o scale, O-27,k-line">])
>    f.puts([<meta name="rating" content="general">])
>    f.puts([<meta name="revisit-after" content="31 Days">])
>    f.puts([<meta name="expires" content="never">])
>    f.puts([<meta name="distribution" content="global">])
>    f.puts([<meta name="choochooauctions.com" content="index,follow">])
>    f.puts([</head>])
>    f.puts([])
>    f.puts([<BODY BGCOLOR="#000080" TEXT="#000000" ALINK="#000000" VLINK="#0033ff" LINK="#0033ff">])
>    f.puts([])
>    f.puts([<TABLE HEIGHT="80%" BORDER="0" align= center bgcolor = "#ffffff" cellpadding = "10">])
>    f.puts([<TR>])
>    f.puts([        <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="600" align=center>])
>    f.puts([<table align="center" border="0" width="95%">])
>    f.puts([<tr>])
>    f.puts([<td width="1220">])
>    f.puts([<p><A HREF="http://www.choochooauctions.com" target = "_new"><IMG SRC="http://www.choochooauctions.com/images/choo.gif" BORDER="0"alt="choochooauctions.com"></A></p>])
>    f.puts([])
>    f.puts([</td>])
>    f.puts([<td width = "100%" align = "right" nowrap><A HREF="http://www.traincity.com/shopbuy.html" TARGET="_new"><img SRC="http://www.choochooauctions.com/images/buy.jpg" ALIGN="right" valign = "center" BORDER = "1" alt=" Click here if you have trains for sale!"</a></td>])
>    f.puts([])
>    f.puts([</table>])
>    f.puts([<BR>])
>    f.puts([<CENTER><HR WIDTH="400" SIZE="3"><P>])
>    f.puts([<b>  <font face="Arial,Helvetica" SIZE="5">Free Electric Train Price Guide<BR></font></b>])
>    f.puts([<FONT FACE="Arial" SIZE="1">(To print:  Right click on list, then click print in the pop-up menu.)<P></FONT></center>])
>    f.puts([<FONT FACE="Arial" SIZE="2">Items shown on this list are not for sale.  This is a price guide generated from our database based on past sales history.  Items appearing in this guide have been sold and are no longer in our inventory.  To view our current inventory please check out <A HREF="http://www.choochooauctions.com" TARGET="_new">choochooauctions.com</A> or <A HREF="http://www.traincity.com" TARGET="_new">traincity.com</A>.  Thanks for using our guides.<P></FONT>])
>    f.puts([])
>    f.puts([<FONT FACE="Arial" SIZE="3">])
>    f.puts([<center>This free <A HREF="http://www.traincity.com/price_guide/read.html">electric train Price Guide</A> brought to you by:<BR>])
>    f.puts([<A HREF="http://www.choochooauctions.com" TARGET="_new"><B>choochooauctions.com</B></A> and <A HREF="http://www.traincity.com" TARGET="_new"><B>traincity.com</B></A>])
>    f.puts([</font>])
>    f.puts([<p>])
>    f.puts([<FONT FACE="Arial" SIZE="-8">])
>    f.puts([<table  cellpadding=3 border = "1" width = "50%">])
>    f.puts([<td align=center><FONT FACE="Arial">]+cListName+[</FONT></A></td>])
>    f.puts([<td align=center><FONT FACE="Arial">Generated ]+cGendate+[</FONT></td>])
>    f.puts([<tr>])
>    f.puts([])
>    f.puts([</font>])
>    f.puts([])
>    f.puts([</TD>])
>    f.puts([</TABLE>])
>    ******************* Build pricelist ***************
>    
>    q = new query()
>    q.sql = 'select title,;
>      grade,;
>      yr ,;
>      asell1 from "'+cTable+'"  ;
>      where yr > '+nEndYear
>    q.active = true
>    f.puts([<FONT FACE="Arial">])
>    f.puts([<center>])
>    f.puts([<table>])
>    f.puts([<table style="font face:=Arial;text-align: left;width: 90% ;height = 150px ;" border="0" cellpadding="1" cellspacing="0">])
>    f.puts([<tbody>])
>    f.puts([<tr>])
>    f.puts([<th style="text-align: left;"><small>DESCRIPTION</small></th>])
>    f.puts([<th style="text-align: left;"><small>GRADE</small></th>])
>    f.puts([<th style="text-align: right;"><small>YEAR</small></th>])
>    f.puts([<th style="text-align: right;"><small>PRICE</small></th>])
>    f.puts([</tr>])
>
>    do while not q.rowset.endofset    
>       f.puts([<tr>])
>       f.puts([<td style="text-align: left; width: 55%;"><small>]+q.rowset.fields["title"].value+[</small></td>])
>       f.puts([<td style="text-align: left; width: 27%;"><small>]+q.rowset.fields["grade"].value+[</small></td>])
>       f.puts([<td style="text-align: right; width: 8%;"><small>]+q.rowset.fields["yr"].value+[</small></td>])
>       f.puts([<td style="text-align: right; width: 10%;"<small>]+q.rowset.fields["asell1"].value+[</small></td>])
>       f.puts([</tr>])
>       q.rowset.next()
>    enddo
>    f.puts([</tbody>])
>    f.puts([</table>])
>    f.puts([</centre>])
>    f.puts([</font>])
>    q.active = false
>    ***************** End of pricelist *********************
>    f.puts([])
>    f.puts([</CENTER>])
>    f.puts([<P>])
>    f.puts([<CENTER><FONT FACE="arial" SIZE="-1">])
>    f.puts([<table border ="0" width = "100%" cellpadding ="3">])
>    f.puts([<td  align=center>])
>    f.puts([<FONT FACE="arial" SIZE="2">])
>    f.puts([<A HREF="index.html"><B>Home</B></A>&nbsp;|&nbsp;<A HREF="read.html"><B>About this guide</B></A>&nbsp;|&nbsp;<A HREF="http://www.choochooauctions.com"><B>Visit choochooauctions.com</B></A>&nbsp;|&nbsp;<A HREF="http://www.traincity.com"><B>Visit traincity.com</B></A>&nbsp;|&nbsp;<A HREF="mailto:trainman@traincity.com"><B>Contact Us</B></a>])
>    f.puts([</font>])
>    f.puts([</td>])
>    f.puts([</table>])
>    f.puts([<table border ="0" width = "60%"  cellpadding ="3">])
>    f.puts([<td  align=center width="100%">])
>    f.puts([<FONT FACE="arial" SIZE="2">])
>    f.puts([<CENTER>All rights reserved.  choochooauctions.com</CENTER>])
>    f.puts([</font>])
>    f.puts([</td>])
>    f.puts([</table>])
>    f.puts([<P>])
>    f.puts([<CENTER>])
>    f.puts([<A HREF="http://www.choochooauctions.com/" target = "_new">])
>    f.puts([<IMG SRC="http://www.traincity.com/banner/choochoo_468x60_animated_low_13k.gif" BORDER="1" alt="Visit Choochooauctions.com"></A>])
>    f.puts([</CENTER>])
>    f.puts([</table>])
>    f.puts([</FONT></CENTER>])
>    f.puts([])
>    f.puts([</TABLE>])
>    f.puts([</HTML>])
>    f.puts([</BODY>])
>    f.close()
>    return true
> clear
> s = seconds()
> if file("data\temp_pkline.dbf")
>    ? "K-Line Electric Trains"
>    make_html_pricelist("mbpkline.html","K-Line Electric Trains","data\temp_pkline")
>    drop table "data\temp_pkline"
> endif
> if file("data\temp_pllgb.dbf")
>    ? "LGB Trains"
>    make_html_pricelist("mbpllgb.html","LGB Trains","data\temp_pllgb")
>    drop table "data\temp_pllgb"
> endif
> if file("data\temp_pmth.dbf")
>    ? "Mike's Train House"
>    make_html_pricelist("mbpmth.html","Mike's Train House","data\temp_pmth")
>    drop table "data\temp_pmth"
> endif
> if file("data\temp_plwe.dbf")
>    ? "Weaver Trains"
>    make_html_pricelist("mbplwe.html","Weaver Trains","data\temp_plwe")
>    drop table "data\temp_plwe"
> endif
> if file("data\temp_plwi.dbf")
>    ? "Williams Trains"
>    make_html_pricelist("mbplwi.html","Williams Trains","data\temp_plwi")
>    drop table "data\temp_plwi"
> endif
> if file("data\temp_pgafpre.dbf")
>    ? "American Flyer Pre War (1906-1946)"
>    make_html_pricelist("mbpgafpre.html","American Flyer Pre War (1906-1946)","data\temp_pgafpre")
>    drop table "data\temp_pgafpre"
> endif
> if file("data\temp_pgafs.dbf")
>    ? "American Flyer S Gauge (1946-1966)"
>    make_html_pricelist("mbpgafs.html","American Flyer S Gauge (1946-1966)","data\temp_pgafs")
>    drop table "data\temp_pgafs"
> endif
> if file("data\temp_pgafmpcn.dbf")
>    ? "American Flyer Modern (1979-Current)"
>    make_html_pricelist("mbpgafmpcn.html","American Flyer Modern (1979-Current)","data\temp_pgafmpcn")
>    drop table "data\temp_pgafmpcn"
> endif
> if file("data\temp_pgafpap.dbf")
>    ? "American Flyer Paper"
>    make_html_pricelist("mbpgafpap.html","American Flyer Paper","data\temp_pgafpap")
>    drop table "data\temp_pgafpap"
> endif
> if file("data\temp_plmxjl.dbf")
>    ? "Marx Joy Line"
>    make_html_pricelist("mbplmxjl.html","Marx Joy Line","data\temp_plmxjl")
>    drop table "data\temp_plmxjl"
> endif
> if file("data\temp_plmxen.dbf")
>    ? "Marx Engines"
>    make_html_pricelist("mbplmxen.html","Marx Engines","data\temp_plmxen")
>    drop table "data\temp_plmxen"
> endif
> if file("data\temp_plmxpa.dbf")
>    ? "Marx Passenger Cars"
>    make_html_pricelist("mbplmxpa.html","Marx Passenger Cars","data\temp_plmxpa")
>    drop table "data\temp_plmxpa"
> endif
> if file("data\temp_plmxrsf.dbf")
>    ? "Marx 4 Wheel Rolling Stock"
>    make_html_pricelist("mbplmxrsf.html","Marx 4 Wheel Rolling Stock","data\temp_plmxrsf")
>    drop table "data\temp_plmxrsf"
> endif
> if file("data\temp_plmxrse.dbf")
>    ? "Marx 8 Wheel Rolling Stock"
>    make_html_pricelist("mbplmxrse.html","Marx 8 Wheel Rolling Stock","data\temp_plmxrse")
>    drop table "data\temp_plmxrse"
> endif
> if file("data\temp_plmxac.dbf")
>    ? "Marx Accessories"
>    make_html_pricelist("mbplmxac.html","Marx Accessories","data\temp_plmxac")
>    drop table "data\temp_plmxac"
> endif
> if file("data\temp_plmxts.dbf")
>    ? "Marx Track & Supplies"
>    make_html_pricelist("mbplmxts.html","Marx Track & Supplies","data\temp_plmxts")
>    drop table "data\temp_plmxts"
> endif
> if file("data\temp_plmxtr.dbf")
>    ? "Marx Transformers"
>    make_html_pricelist("mbplmxtr.html","Marx Transformers","data\temp_plmxtr")
>    drop table "data\temp_plmxtr"
> endif
> if file("data\temp_plmxst.dbf")
>    ? "Marx Sets"
>    make_html_pricelist("mbplmxst.html","Marx Sets","data\temp_plmxst")
>    drop table "data\temp_plmxst"
> endif
> if file("data\temp_plmxho.dbf")
>    ? "Marx HO Gauge"
>    make_html_pricelist("mbplmxho.html","Marx HO Gauge","data\temp_plmxho")
>    drop table "data\temp_plmxho"
> endif
> if file("data\temp_pllist.dbf")
>    ? "Lionel Pre-War Standard Gauge"
>    make_html_pricelist("mbpllist.html","Lionel Pre-War Standard Gauge","data\temp_pllist")
>    drop table "data\temp_pllist"
> endif
> if file("data\temp_plpreo.dbf")
>    ? "Lionel Pre-War O Gauge"
>    make_html_pricelist("mbplpreo.html","Lionel Pre-War O Gauge","data\temp_plpreo")
>    drop table "data\temp_plpreo"
> endif
> if file("data\temp_lionel_pos.dbf")
>    ? "Lionel Post War Trains(1945-1969)"
>    make_html_pricelist("mblionel_postw.html","Lionel Post War Trains(1945-1969)","data\temp_lionel_pos")
>    drop table "data\temp_lionel_pos"
> endif
> if file("data\temp_plliacp.dbf")
>    ? "Lionel Accessories Post War"
>    make_html_pricelist("mbplliacp.html","Lionel Accessories Post War","data\temp_plliacp")
>    drop table "data\temp_plliacp"
> endif
> if file("data\temp_pllipwd.dbf")
>    ? "Lionel Diesel Engines"
>    make_html_pricelist("mbpllipwd.html","Lionel Diesel Engines","data\temp_pllipwd")
>    drop table "data\temp_pllipwd"
> endif
> if file("data\temp_pllielp.dbf")
>    ? "Lionel Electric Locos"
>    make_html_pricelist("mbpllielp.html","Lionel Electric Locos","data\temp_pllielp")
>    drop table "data\temp_pllielp"
> endif
> if file("data\temp_pllimzp.dbf")
>    ? "Lionel Motorized Units"
>    make_html_pricelist("mbpllimzp.html","Lionel Motorized Units","data\temp_pllimzp")
>    drop table "data\temp_pllimzp"
> endif
> if file("data\temp_pllipws.dbf")
>    ? "Lionel Steam Locomotives"
>    make_html_pricelist("mbpllipws.html","Lionel Steam Locomotives","data\temp_pllipws")
>    drop table "data\temp_pllipws"
> endif
> if file("data\temp_pllipcp.dbf")
>    ? "Lonel Passenger Cars"
>    make_html_pricelist("mbpllipcp.html","Lonel Passenger Cars","data\temp_pllipcp")
>    drop table "data\temp_pllipcp"
> endif
> if file("data\temp_pllirsp.dbf")
>    ? "Lionel Rolling Stock"
>    make_html_pricelist("mbpllirsp.html","Lionel Rolling Stock","data\temp_pllirsp")
>    drop table "data\temp_pllirsp"
> endif
> if file("data\temp_pllistp.dbf")
>    ? "Lionel Sets Post War"
>    make_html_pricelist("mbpllistp.html","Lionel Sets Post War","data\temp_pllistp")
>    drop table "data\temp_pllistp"
> endif
> if file("data\temp_lionel_ho.dbf")
>    ? "Lionel HO Gauge"
>    make_html_pricelist("mblionel_ho.html","Lionel HO Gauge","data\temp_lionel_ho")
>    drop table "data\temp_lionel_ho"
> endif
> if file("data\temp_lionel_mod.dbf")
>    ? "Lionel Modern (1970 - Present)"
>    make_html_pricelist("mblionel_modern.html","Lionel Modern (1970 - Present)","data\temp_lionel_mod")
>    drop table "data\temp_lionel_mod"
> endif
> if file("data\temp_plliacm.dbf")
>    ? "Lionel Accessories Modern"
>    make_html_pricelist("mbplliacm.html","Lionel Accessories Modern","data\temp_plliacm")
>    drop table "data\temp_plliacm"
> endif
> if file("data\temp_plliem.dbf")
>    ? "Lionel Engines Modern Diesel"
>    make_html_pricelist("mbplliem.html","Lionel Engines Modern Diesel","data\temp_plliem")
>    drop table "data\temp_plliem"
> endif
> if file("data\temp_pllielm.dbf")
>    ? "Lionel Electric Locos"
>    make_html_pricelist("mbpllielm.html","Lionel Electric Locos","data\temp_pllielm")
>    drop table "data\temp_pllielm"
> endif
> if file("data\temp_pllimzm.dbf")
>    ? "Lionel Motorized Units MPC"
>    make_html_pricelist("mbpllimzm.html","Lionel Motorized Units MPC","data\temp_pllimzm")
>    drop table "data\temp_pllimzm"
> endif
> if file("data\temp_plliems.dbf")
>    ? "Lionel Steam Engines (1901-19420"
>    make_html_pricelist("mbplliems.html","Lionel Steam Engines (1901-19420","data\temp_plliems")
>    drop table "data\temp_plliems"
> endif
> if file("data\temp_pllipcm.dbf")
>    ? "Lionel Modern Passenger Cars"
>    make_html_pricelist("mbpllipcm.html","Lionel Modern Passenger Cars","data\temp_pllipcm")
>    drop table "data\temp_pllipcm"
> endif
> if file("data\temp_pllirsm.dbf")
>    ? "Lionel Modern Rolling Stock"
>    make_html_pricelist("mbpllirsm.html","Lionel Modern Rolling Stock","data\temp_pllirsm")
>    drop table "data\temp_pllirsm"
> endif
> if file("data\temp_pllistm.dbf")
>    ? "Lionel Sets Modern"
>    make_html_pricelist("mbpllistm.html","Lionel Sets Modern","data\temp_pllistm")
>    drop table "data\temp_pllistm"
> endif
> if file("data\temp_plliocl.dbf")
>    ? "Lionel O Gauge Classics"
>    make_html_pricelist("mbplliocl.html","Lionel O Gauge Classics","data\temp_plliocl")
>    drop table "data\temp_plliocl"
> endif
> if file("data\temp_pllistcl.dbf")
>    ? "Lionel Standard Gauge Classics"
>    make_html_pricelist("mbpllistcl.html","Lionel Standard Gauge Classics","data\temp_pllistcl")
>    drop table "data\temp_pllistcl"
> endif
> if file("data\temp_plipap.dbf")
>    ? "Lionel Paper"
>    make_html_pricelist("mbplipap.html","Lionel Paper","data\temp_plipap")
>    drop table "data\temp_plipap"
> endif
> if file("data\temp_pllits.dbf")
>    ? "Lionel Track & Supplies"
>    make_html_pricelist("mbpllits.html","Lionel Track & Supplies","data\temp_pllits")
>    drop table "data\temp_pllits"
> endif
> if file("data\temp_pllitr.dbf")
>    ? "Lionel Transformers"
>    make_html_pricelist("mbpllitr.html","Lionel Transformers","data\temp_pllitr")
>    drop table "data\temp_pllitr"
> endif
> ? "Seconds", seconds() - s
>
> clear
> set safety off
> s = seconds()
> *    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for K-Line Electric Trains
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%K_LINE%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pkline"
>  
> */
> *    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for LGB Trains
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LGB%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllgb"
>  
> */
> *    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Mike's Train House
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MIKE%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pmth"
>  
> */
> *    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Weaver Trains
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%WEAVER%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plwe"
>  
> */
> *    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Williams Trains
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%WILLIAMS%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plwi"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for American Flyer Pre War (1906-1946)
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%AMERICAN%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pgafpre"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for American Flyer S Gauge (1946-1966)
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%AMERICAN%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pgafs"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for American Flyer Modern (1979-Current)
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%AMERICAN%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pgafmpcn"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for American Flyer Paper
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%AMERICAN%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pgafpap"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Joy Line
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxjl"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Engines
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxen"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Passenger Cars
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxpa"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx 4 Wheel Rolling Stock
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxrsf"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx 8 Wheel Rolling Stock
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxrse"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Accessories
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxac"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Track & Supplies
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxts"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Transformers
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxtr"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx Sets
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxst"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Marx HO Gauge
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%MARX%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plmxho"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Pre-War Standard Gauge
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllist"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Pre-War O Gauge
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plpreo"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Post War Trains(1945-1969)
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_lionel_pos"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Accessories Post War
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plliacp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Diesel Engines
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllipwd"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Electric Locos
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllielp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Motorized Units
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllimzp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Steam Locomotives
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllipws"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lonel Passenger Cars
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllipcp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Rolling Stock
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllirsp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Sets Post War
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllistp"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel HO Gauge
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_lionel_ho"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Modern (1970 - Present)
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_lionel_mod"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Accessories Modern
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plliacm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Engines Modern Diesel
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plliem"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Electric Locos
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllielm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Motorized Units MPC
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllimzm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Steam Engines (1901-19420
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plliems"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Modern Passenger Cars
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllipcm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Modern Rolling Stock
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllirsm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Sets Modern
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllistm"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel O Gauge Classics
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plliocl"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Standard Gauge Classics
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllistcl"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Paper
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_plipap"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Track & Supplies
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllits"
>  
> */
> /*    Remove the leading / to uncomment this SQL statement
>  
>  // Create temp_table for Lionel Transformers
>  
> select part_no,title,grade,cast(extract(year from sdate) as int) yr,;
> cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%LIONEL%" ;
>                                                              ;
> order by part_no ;
> save to "data\temp_pllitr"
>  
> */
> set safety on
> ? "Seconds", seconds() - s
>