List:MySQL on Win32« Previous MessageNext Message »
From:Daniel Bronzeri Barbosa Date:September 22 2004 1:28pm
Subject:Re: [BRMA-ALTO-RISCO] RE: HELP with "INSERT SELECT"
View as plain text  
How i can do this?

----- Original Message ----- 
From: "Patino, Hernando" <hernando.patino@stripped>
To: "'Daniel Bronzeri Barbosa'" <daniel@stripped>;
<win32@stripped>
Sent: Wednesday, September 22, 2004 9:43 AM
Subject: [BRMA-ALTO-RISCO] RE: HELP with "INSERT SELECT"


Daniel

Your second SQL statement will produce a Cartesian table

Insert into fun_informations
(Select conn.INT_InternalCallId as INT_InternalCallId,
 'CID' as CHR_PropName,
 'AAAAAA' as CHR_PropValue,
 1 as INT_Updated,
 null as INT_Key
 from cti_connections conn left join app_ivrtable ivr
 on conn.chr_device=ivr.chr_device
 where conn.int_state = 7 and
 ivr.CHR_Machine = 'm1'
 and ivr.INT_IVRLine = '1'),

>>
(Select conn.INT_InternalCallId as INT_InternalCallId,
 'CPN' as CHR_PropName,
 'BBBBB' as CHR_PropValue,
 1 as INT_Updated,
 null as INT_Key
 from cti_connections conn left join app_ivrtable ivr
 on conn.chr_device=ivr.chr_device
 where conn.int_state = 7 and
 ivr.CHR_Machine = 'm1'
 and ivr.INT_IVRLine = '1')

>> You need a UNION statement?


Hernando


*********************************************************************
This message and any attachments are solely for the intended recipient. If
you are not the intended recipient, disclosure, copying, use or distribution
of the information included in this message is prohibited -- Please
immediately and permanently delete.


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=1

Thread
HELP with "INSERT SELECT"Daniel Bronzeri Barbosa22 Sep
  • Re: HELP with "INSERT SELECT"SGreen22 Sep
    • RE: HELP with "INSERT SELECT"Jordan Sparks22 Sep
      • undefined function mysql_connect()Catapult Webmaster22 Sep
        • Re: undefined function mysql_connect()Randy Clamons22 Sep
          • Unable to edit rows in Query BrowserMichael Crowl22 Sep
            • Re: Unable to edit rows in Query BrowserRandy Clamons22 Sep
              • Re: Unable to edit rows in Query BrowserMichael Crowl22 Sep
RE: HELP with "INSERT SELECT"Hernando Patino22 Sep
  • Re: [BRMA-ALTO-RISCO] RE: HELP with "INSERT SELECT"Daniel Bronzeri Barbosa22 Sep