Ver Mensaje Individual
  #9 (permalink)  
Antiguo 09/04/2014, 18:15
echo_
 
Fecha de Ingreso: noviembre-2011
Ubicación: Paris
Mensajes: 450
Antigüedad: 13 años
Puntos: 7
Respuesta: Problemas con UNION ALL

Me sale columnas vacias, yo lo intento hacer asi:
Código MySQL:
Ver original
  1. SELECT tl.idperson, tl.firstName, tl.lastName, tl.telephone, tl.degreeOfInterest, l.appointmentDate, e.firstName, i.marketability
  2.   FROM `todos_los_leads` AS tl
  3.   INNER JOIN leads AS l ON tl.idperson = l.idPerson
  4.   INNER JOIN empleados AS e ON tl.idEmployee = e.idEmployee
  5.   INNER JOIN infonavit AS i ON tl.idInfonavit = i.idInfonavit
  6.   SELECT s.monthlyIncome
  7.   FROM `todos_los_leads` AS tl
  8.   INNER JOIN shf AS s ON tl.idSHF = s.idSHF

En todos los leads guardo:
Código SQL:
Ver original
  1. idperson,firstName,lastName,middleName,email,address1,address2,colony,city,idState,zipcode,telephone,cellphone,otherphone,active,idEmployee,idEmployeeCSR,company,LENGTH,POSITION,gender,ssn,maritalStatus,kids,birthDate,createdDate,idFlag,spouse,needFinancing,idMarketingSource,idAccountGroup,idLeadClass,idDistributionChannel,idCustomerClass,idIncomeClass,idProfessionClass,idSalesZone,idTitle,comments,idCommunicationClass,infonavitQualify,visitCount,sessionId,idPersonContact,idEmployeeCSRLead,idEmployeeCSRPostSale,curp,idInfonavit,idSHF,appliesFOVISSSTE,leadType,companyVisited,idCampaing,degreeOfInterest,reallocations,lastAssignment,idBranch,idBranchLead,hasExtras,idEmployeeCSRTitration,idBranchTitration,degreeOfInterestChangedDate,idBranchPostSale,idPersonSAP,idSellersGroup,idNotQualifyReason,idcreditBureau,preQualification,infoLastUpdated,idEmployeeCSRTelemarketing,creditNumber,isSubsidy,folio

En infonavit:
Código SQL:
Ver original
  1. idInfonavit,qualifies,credit,ssv,marketability,expectedDate

Y en SHF:
Código SQL:
Ver original
  1. idSHF,TYPE,monthlyIncome,saveDate1,saveDate2,saveDate3,saveDate4,saveDate5,saveDate6

Última edición por gnzsoloyo; 09/04/2014 a las 18:49