Re: Quick help with Insert

Re: Quick help with Insert

am 19.01.2010 20:00:40 von h.bacik

------=_NextPart_000_0073_01CA9942.1412FB40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit


Hey
Not really quick.... ;> - But nobody knows an answer?

THX


-----Ursprüngliche Nachricht-----
Von: Intell! Soft [mailto:intellisoft@fachoptiker.net]
Bereitgestellt: Donnerstag, 14. Jänner 2010 17:40
Bereitgestellt in: gmane.comp.db.mysql.general
Unterhaltung: Quick help with Insert
Betreff: Quick help with Insert

Hey

I would need quick help with an Insert statement
So, I have two tables Table A & Table B
So, in Table A I have a field called customerID
The same field I do have in Table B
So, I want to find out, which customerID from Table A is NOT in Table B
and fill the customerID's which are not present in Table B.

Understood? - Hope so

THX !





------=_NextPart_000_0073_01CA9942.1412FB40
Content-Type: text/plain; charset=us-ascii


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
------=_NextPart_000_0073_01CA9942.1412FB40--

Re: Quick help with Insert

am 19.01.2010 20:14:48 von Carlos Proal

--------------020503070602040506000302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit


Hi !!

You need a left join and then an insert.
Please read: http://dev.mysql.com/doc/refman/5.1/en/join.html or google
for tutorials on left join

And tell me if you have further questions

Carlos


On 1/19/2010 1:00 PM, Intell! Soft wrote:
> Hey
> Not really quick.... ;> - But nobody knows an answer?
>
> THX
>
>
> -----Ursprüngliche Nachricht-----
> Von: Intell! Soft [mailto:intellisoft@fachoptiker.net]
> Bereitgestellt: Donnerstag, 14. Jänner 2010 17:40
> Bereitgestellt in: gmane.comp.db.mysql.general
> Unterhaltung: Quick help with Insert
> Betreff: Quick help with Insert
>
> Hey
>
> I would need quick help with an Insert statement
> So, I have two tables Table A& Table B
> So, in Table A I have a field called customerID
> The same field I do have in Table B
> So, I want to find out, which customerID from Table A is NOT in Table B
> and fill the customerID's which are not present in Table B.
>
> Understood? - Hope so
>
> THX !
>
>
>
>
>
>
>
>
>


--------------020503070602040506000302--

Re: Quick help with Insert

am 19.01.2010 21:57:49 von h.bacik

------=_NextPart_000_0092_01CA9952.71645810
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Thanks! - I found a Insert Into on your tip:

Insert Into Lieferanten (Lieferant)
select distinct
a.lieferant
from artikelstamm a
left join lieferanten b on
a.lieferant = b.lieferant
where
b.lieferant is null




-----Ursprüngliche Nachricht-----
Von: Carlos Proal [mailto:carlos.proal@gmail.com]
Bereitgestellt: Dienstag, 19. Jänner 2010 20:15
Bereitgestellt in: gmane.comp.db.mysql.general
Unterhaltung: Quick help with Insert
Betreff: Re: Quick help with Insert


Hi !!

You need a left join and then an insert.
Please read: http://dev.mysql.com/doc/refman/5.1/en/join.html or google
for tutorials on left join

And tell me if you have further questions

Carlos


On 1/19/2010 1:00 PM, Intell! Soft wrote:
> Hey
> Not really quick.... ;> - But nobody knows an answer?
>
> THX
>
>
> -----Ursprüngliche Nachricht-----
> Von: Intell! Soft [mailto:intellisoft@fachoptiker.net]
> Bereitgestellt: Donnerstag, 14. Jänner 2010 17:40
> Bereitgestellt in: gmane.comp.db.mysql.general
> Unterhaltung: Quick help with Insert
> Betreff: Quick help with Insert
>
> Hey
>
> I would need quick help with an Insert statement
> So, I have two tables Table A& Table B
> So, in Table A I have a field called customerID
> The same field I do have in Table B
> So, I want to find out, which customerID from Table A is NOT in Table
B
> and fill the customerID's which are not present in Table B.
>
> Understood? - Hope so
>
> THX !
>
>
>
>
>
>
>
>
>



------=_NextPart_000_0092_01CA9952.71645810
Content-Type: text/plain; charset=us-ascii


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
------=_NextPart_000_0092_01CA9952.71645810--

Re: Quick help with Insert

am 21.01.2010 16:15:34 von Tom Worster

that's exactly how i do it.


On 1/19/10 3:57 PM, "Intell! Soft" wrote:

> Thanks! - I found a Insert Into on your tip:
>=20
> Insert Into Lieferanten (Lieferant)
> select distinct
> a.lieferant
> from artikelstamm a
> left join lieferanten b on
> a.lieferant =3D b.lieferant
> where
> b.lieferant is null
>=20
>=20
>=20
>=20
> -----Ursprüngliche Nachricht-----
> Von: Carlos Proal [mailto:carlos.proal@gmail.com]
> Bereitgestellt: Dienstag, 19. Jänner 2010 20:15
> Bereitgestellt in: gmane.comp.db.mysql.general
> Unterhaltung: Quick help with Insert
> Betreff: Re: Quick help with Insert
>=20
>=20
> Hi !!
>=20
> You need a left join and then an insert.
> Please read: http://dev.mysql.com/doc/refman/5.1/en/join.html or google
> for tutorials on left join
>=20
> And tell me if you have further questions
>=20
> Carlos
>=20
>=20
> On 1/19/2010 1:00 PM, Intell! Soft wrote:
>> Hey
>> Not really quick.... ;> - But nobody knows an answer?
>>=20
>> THX
>>=20
>>=20
>> -----Ursprüngliche Nachricht-----
>> Von: Intell! Soft [mailto:intellisoft@fachoptiker.net]
>> Bereitgestellt: Donnerstag, 14. Jänner 2010 17:40
>> Bereitgestellt in: gmane.comp.db.mysql.general
>> Unterhaltung: Quick help with Insert
>> Betreff: Quick help with Insert
>>=20
>> Hey
>>=20
>> I would need quick help with an Insert statement
>> So, I have two tables Table A& Table B
>> So, in Table A I have a field called customerID
>> The same field I do have in Table B
>> So, I want to find out, which customerID from Table A is NOT in Table
> B
>> and fill the customerID's which are not present in Table B.
>>=20
>> Understood? - Hope so
>>=20
>> THX !
>>=20
>>=20
>>=20
>>=20
>>=20
>>=20
>>=20
>>=20
>>=20
>=20
>=20



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg