Re: Load Data with extra field

2001-11-12 Thread Carl Troein


M. A. Alves writes:

 mysql database $!#$#%$

I know the feeling. :-P

  On Sun, 11 Nov 2001, Michael Conley wrote:
   . . . even though the text files that I am importing don't have the
   customer number of the person who submitted it, if I know the customer
   number . . .
 
  Where from do you get that information (costumer number) at import time?

User input, I'd guess.

Anyway, I'd like to add a third way to do it:
Create a temporary table, load your data into that table, and then
do a INPUT ... SELECT ... where you put that user-input value in
the field list of the SELECT, e.g.:
INSERT INTO foo (a,b) SELECT 10,b FROM tmptable

//C

-- 
 Carl Troein - CĂ­rdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




The EXTRA field

2001-09-09 Thread Ralof

Hi, I would like to use the EXTRA field for 
sorting and maybe caption, but I find no way
of setting it.
I tried like:

Alter table myTable 
change  myField myNewField varchar(255) DEFAULT 'a' EXTRA '3'

But that does not work.
I can not find anything in the documentation about this.

Thanks

Stefan

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php