[Jprogramming] bulk insert with ODBC (into MySQL db)

Denis Samson denis_samson at hotmail.com
Fri Jul 9 11:29:24 HKT 2010


Bill,
      this representation for CHARs is fine, and a nice extension would correspond pretty closely to VARCHARs, which is very convenient when the lengths are very variable (e.g. a column COMMENTS VARCHAR(1000) used in 1% of rows).  This could be represented as a vector of char vectors...  
      I do need that, in fact, and I might tweek <ddins> for that purpose if I can find any time and can convince the MySQL driver to accept that!

Denis

> Date: Fri, 9 Jul 2010 06:55:25 +0800
> From: bbill.lam at gmail.com
> To: programming at jsoftware.com
> Subject: Re: [Jprogramming] bulk insert with ODBC (into MySQL db)
> 
> Denis,
> 
> Thanks for testing, I guess that assertion should be relaxed to allow
> number to be either rank-1 or rank-2 column vector.  However text
> should remain as rank-2 character matrix.
> 
> inverted table
> http://www.jsoftware.com/jwiki/Essays/Inverted%20Table
> 
> Чтв, 08 Июл 2010, Denis Samson писал(а):
> > 
> > Bill,
> > 
> >     I retried it with (>'un';'deux') and ddins works fine; OTOH, ddins insists on having data in columns, for some unknown  -& quite unnecessary, I'd guess-  reason:
> > 
> >    lh=.'select hnd,id,lat,lon from stop'; 3 4; (>'un';'deux'); 1234 1234; 2345 2345
> >    lh ddins ch
> > _1
> >    NB. (because ddins[4]  if. -. *./ 2=> #@$&.>}.x do. errret ISI08 return. end.)
> > 
> >    lh=.'select hnd,id,lat,lon from stop'; ,.each 3 4; (>'un';'deux'); 1234 1234; 2345 2345
> >    lh ddins ch
> > 0
> >    ]data=. ddfch _1,~ 'select * from stop' ddsel ch
> > ┌─┬────────────────────┬────┬────┬──┐
> > │3│un                  │1234│2345│__│
> > │4│deux                │1234│2345│__│
> > └─┴────────────────────┴────┴────┴──┘
> > 
> > regards,
> > Denis
> > 
> > 
> > > Date: Thu, 8 Jul 2010 01:16:57 +0800
> > > From: bbill.lam at gmail.com
> > > To: programming at jsoftware.com
> > > Subject: Re: [Jprogramming] bulk insert with ODBC (into MySQL db)
> > > 
> > > Срд, 07 Июл 2010, Denis Samson писал(а):
> > > > 
> > (...) 
> > > >    ]lh=:'select hnd,id,lat,lon from stop';,.each 1 2;('un';'deux');1234 1235;2345 2345
> > > > ┌──────────────────────┬─┬──────┬────┬────┐
> > > > │select hnd,id,lat,lon from stop│1│┌────┐│1234│2345│
> > > > │                                                                     │2││un     ││1235│2345│
> > > > │                                                                      │ │├────┤│       │         │
> > > > │                                                                      │ ││deux ││       │        │
> > > > │                                                                      │ │└────┘│          │         │
> > > > └──────────────────────┴─┴──────┴────┴───┘
> > > 
> > > I think that should be
> > > ]lh=:'select hnd,id,lat,lon from stop'; 1 2;(>'un';'deux');1234 1235;2345 2345
> > > 
> > > shape of numbers doesn't matter but string data must not boxed, may be
> > > that is the reason for the funny characters returned.
> > > 
> > > -- 
> > > regards,
> > > ====================================================
> > > GPG key 1024D/4434BAB3 2008-08-24
> > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> >  		 	   		  
> > _________________________________________________________________
> 
> -- 
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
 		 	   		  
_________________________________________________________________



More information about the Programming mailing list