#mysql - Mon 16 Apr 2007 between 00:00 and 00:21

NY Lost Funds



Reiser2select sap.no_doc=indices.numero_documento and sap.fecha=indices.fecha_contabilidad from sap, indices;
chadmaynardshould one of those be in the where clause?
Reiser2humm???
DoctorPepperreiser2> select [name of the field to print out ] from table,... WHETE Critera
WHERE critera
Reiser2WHERE criteria will be no_doc=documento_numero ?
chadmaynardI love doctor pepper
Reiser2in this case
graywhiteit doesn't love my bowels
Reiser2SELECT * FROM `indices` WHERE numero_documento=(SELECT sap.no_doc from sap);
but this return various
this could be the solutions
chadmaynard: wake up
chadmaynardsorry. doing physics
what is the question
ok
SELECT indeces.* FROM `indices` LEFT JOIN sap ON (indeces.numero_documento = sap.no_doc); <- is the same thing right?
arjenAUchadmaynard: no left
Reiser2hummm
arjenAUif you don't know why you'd want to use left, leave it out. good basic rule.
of course, understanding joins helps.
Reiser2no work
humm
wait
chadmaynardarjenAU: um ok..
Reiser2congratulations
arjenAUthat sounded nastier than intended btw.
Reiser2it works
the_wenchBut of course it does
arjenAUit's just that the expanation takes longer than the hint
Reiser2ok, but it only compared one column of each table
chadmaynardarjenAU: well i'll work on understanding things
Reiser2now i have to compare 2 columns
chadmaynardSELECT sap.no_doc=indices.numero_documento AS match, indeces.* FROM `indices` JOIN sap ON (indeces.numero_documento = sap.no_doc);
Reiser2chadmaynard: are you there?
chadmaynardi still think you want left join and i even know why but of course im just a moron
reiser2: if either sap.no_doc or indices.numero_documento is NULL the boolean will become NULL as well...
Reiser2error
coN|porQueanyone here :x
Reiser2#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match , indices . * FROM `indices` JOIN sap ON ( indices . numero_documento = sa' at line 1

Page: 2 9 16 23 30 37 44 51 

IrcArchive

NY Lost Funds