» »

SQL problem

SQL problem

darh ::

en manjsi problemcek... kako naredit LEFT OUTER JOIN z eno "levo" tabelo pa dvema "desnima"... zdej mam tkole:

FROM zNews n LEFT OUTER JOIN zNews_comments c ON n.id = c.newsID, zNews_sources s, users u
WHERE n.visible = "true" AND s.id = n.sourceID AND u.userID = n.writerID


ampak mi ne prikaze tistih novic, k imajo sourceID = 0 !! zato bi pa rabu LEFT OUTER JOIN med zNews pa zNews_sources ampak ga mam ze med zNews pa zNews_comments

damn...

če kdo ve... plz... let me know...
Excuses are useless! Results are priceless!
  • spremenil: darh ()

strel ::

Pa ka vi sql stavke na roke pišete ???

ACCES si zalaufi pa query nares grafično pa ti bo SQL zgeneriral ti pa sam kak parameter popraviš, al pa jst pojma nimam ???

darh ::

no .. strel.. pa ti zalaufej ACCESS pa reš tale problem... nekak ne znam nc v accessu delat pa še z debilnimi MS produkti se mi ne da ukvarjat...
Excuses are useless! Results are priceless!

OwcA ::

joine lahko povezueš:

(join_statement_1) inner/outer/whatever join table on ...

tonic ::

pod VFPjem bi to naredo tak:

select ... from leva left outer join desna1 on leva.id_l=desna1.id_d1 left outer join desna2 on desna1.id_d1=desna2.id_d2 where ...

ampak pazi: outer ti nafila polja z NULL vrednostmi če v tabeli ki jo joinaš ni zapisa

za tistega en post pred mano:
INNER pa OUTER mata čist drugo vlogo kot pa da bi povezovala JOINe

INNER JOIN specifies that the query result contains only rows from a table that match one or more rows in another table.

LEFT [OUTER] JOIN specifies that the query result contains all rows from the table to the left of the JOIN keyword and only matching rows from the table to the right of the JOIN keyword. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.

RIGHT [OUTER] JOIN specifies that the query result contains all rows from the table to the right of the JOIN keyword and only matching rows from the table to the left of the JOIN keyword. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.

FULL [OUTER] JOIN specifies that the query result contains all matching and non matching rows from both tables. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.

ON JoinCondition specifies the conditions for which the tables are joined.

darh ::

ejga.. tonic.. najlepša ti dala !

lih to sm isku... bom jutr probu, ce dela tko kt je treba ! 8-)
Excuses are useless! Results are priceless!


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

[SQL] Pohitritev izpisa

Oddelek: Programiranje
252971 (1870) kuall
»

[SQL] teževa pri iskanju zapisov

Oddelek: Programiranje
102116 (1706) lopow
»

SQL - izpit

Oddelek: Programiranje
102048 (1072) FTad
»

MySQL join problem

Oddelek: Programiranje
101547 (1445) Poldi112
»

pgSQL problem z indexi...

Oddelek: Izdelava spletišč
71169 (1079) Tito

Več podobnih tem