Tema: Re: mysql. kodel taip daros?
Autorius: amba
Data: 2009-11-06 11:21:48
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18828">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>na taip, viskas ok, tik kodel pridejus tas 
dvi&nbsp; funkcijas (format ir sum) i ta pacia uzklausa gaunami skirtingi 
rezultatai&nbsp;?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV>"Mindaugas J." &lt;<A 
href="mailto:mindaugas@i-solutions.lt">mindaugas@i-solutions.lt</A>&gt; wrote in 
message <A 
href="news:hd0ifp$s5n$1@trimpas.omnitel.net">news:hd0ifp$s5n$1@trimpas.omnitel.net</A>...</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV><FONT size=2>LEFT JOIN atveju imami visi raai i kairiosios lentels ir 
  jungiami su deiniosioss lentels raais, ir tik nesant deiniosios lentels 
  raams jie paliekami tuti (NULL).</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Todl ia viskas yra gerai.</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>-Mindaugas J.</FONT></DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
  dir=ltr>
    <DIV>"amba" &lt;<A href="mailto:a@a.lt">a@a.lt</A>&gt; wrote in message <A 
    href="news:hcvk5d$7ig$1@trimpas.omnitel.net">news:hcvk5d$7ig$1@trimpas.omnitel.net</A>...</DIV>
    <DIV><FONT size=2 face=Arial>yra&nbsp;2 lentos ir jas joininu</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
    <DIV><FONT size=2 face=Arial>SELECT&nbsp;</FONT></DIV>
    <DIV><FONT size=2 face=Arial>&nbsp;&nbsp;&nbsp; t1.col, </FONT></DIV>
    <DIV><FONT size=2 face=Arial>&nbsp;&nbsp;&nbsp; t2.col&nbsp;</FONT></DIV>
    <DIV><FONT size=2 face=Arial>FROM&nbsp;t1 </FONT></DIV>
    <DIV><FONT size=2 face=Arial>LEFT JOIN&nbsp;t2&nbsp;ON t1.t2_id = t2.id 
    </FONT></DIV>
    <DIV><FONT size=2 face=Arial>WHERE&nbsp;t1.year =&nbsp;2005 </FONT></DIV>
    <DIV><FONT size=2 face=Arial>&nbsp;&nbsp;&nbsp;&nbsp;AND t2.id = 
    1</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
    <DIV><FONT size=2 face=Arial>jeigu t1.year tokio irasho ner, bet yra t2.id, 
    tai rezultate tureciau gaut visur null. taip?</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
    <DIV><FONT size=2 face=Arial>bet jeigu selecte sumetu sias 2 
    funkcijas:&nbsp;select FORMAT(SUM(t1.col), 2) AS test, t2.col 
    from....</FONT></DIV>
    <DIV><FONT size=2 face=Arial>tada rodo tablo t2.col eilute, kurios id = 1, o 
    'test', aisku, null</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
    <DIV><FONT size=2 face=Arial>gal nutuokiat kodel ?</FONT></DIV>
    <DIV><FONT size=2 
face=Arial></FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

3Dastronomyagricultureaudioautosautos.audiautos.audioautos.binariesautos.bmwautos.clubautos.fordautos.hondacrxautos.japanautos.mercedesautos.opelautos.sportautos.volvoautos.vwaviaavia.binariesbankcardsbinariesbooksbuildingcinemacommercecomp.hardwarecomp.softwarecomp.lietuvinimascomp.networksculturedarbas.ieskaudarbas.siulaudesigneconomicselectronicsfaunafauna.aquafauna.binariesfishingflorafotofoto.binariesgamesgames.csgames.onlinegsmgurmanaihumourhumour.binariesinternetlawmicrosoftmotomusicmusic.binariesmusic.instrumentsmusic.LT.binariesnavigacijaphppoliticsprogrammingrpgsportstudyingsveikatatalktesttranslationtransportationtraveltravel.binariestvunixvideovideo.binarieswatersportswwwwww.flashpdaautos.supermama.ltmobiledarbasretro.3Dretro.agricultureretro.astronomyretro.audioretro.autosretro.autos.audiretro.autos.audioretro.autos.binariesretro.autos.bmwretro.autos.clubretro.autos.fordretro.autos.hondacrxretro.autos.japanretro.autos.mercedesretro.autos.opelretro.autos.sportretro.autos.supermamaretro.autos.supermama.ltretro.autos.volvoretro.autos.vwretro.aviaretro.avia.binariesretro.bankcardsretro.beosretro.binariesretro.booksretro.buildingretro.cinemaretro.commerceretro.compretro.comp.hardwareretro.comp.lietuvinimasretro.comp.networksretro.comp.softwareretro.cultureretro.darbasretro.darbas.ieskauretro.darbas.siulauretro.designretro.economicsretro.electronicsretro.e-vejasretro.faunaretro.fauna.aquaretro.fauna.binariesretro.fishingretro.floraretro.fotoretro.foto.binariesretro.gamesretro.games.csretro.games.onlineretro.games.rpgretro.genealogijaretro.gsmretro.gurmanairetro.humourretro.humour.binariesretro.internetretro.YZFretro.YZF.nebukretro.YZF.nebuk.netikintisretro.YZF.nebuk.netikintis.bukretro.YZF.nebuk.netikintis.buk.tikintisretro.lawretro.microsoftretro.mobileretro.motoretro.musicretro.music.binariesretro.music.instrumentsretro.music.LTretro.music.LT.binariesretro.navigacijaretro.newsretro.news.taisyklesretro.newuserretro.pdaretro.phpretro.politicsretro.programmingretro.rpgretro.sportretro.studyingretro.sveikataretro.talkretro.translationretro.transportationretro.travelretro.travel.binariesretro.tvretro.unixretro.videoretro.video.binariesretro.watersportsretro.wwwretro.www.flashdiylt.rkm.news.announcelt.rkm.news.newuser