TtleeMedlem sedan mars 2001290 inlägg Frågan#1 Hej!
Jag har problem med en join av två tabeller
tbl_Products:
col_ArticleNr
col_Price
col_Name
col_Group
tbl_Test:
col_ArticleNr
col_Price_1
col_Price_2
col_Price_3
col_Price_4
col_Price_5
col_Visible
--------------------------------------------------------
col_ArticleNr har en relation mellan de båda tabellerna.
Vad jag nu vill göra är en SELECT sats som plockar följande tabeller.
tbl_Products.col_ArticleNr
tbl_Products.col_Price
tbl_Products.col_Name
tbl_Products.col_Group
tbl_Test.col_Price_1
tbl_Test.col_Price_2
tbl_Test.col_Price_3
tbl_Test.col_Price_4
tbl_Test.col_Price_5
tbl_Test.col_Visible
DÄR col_ArticleNr är lika i båda tabellerna och tbl_Products.col_Group=CPU ?
Kan någon hjälpa till med detta, jag får ingen fason på det alls :(
Tack!
/Tobias
spangoMedlem sedan juni 20008 205 inläggTja...
SELECT p.col_ArticleNr, p.col_Price, p.col_Name, p.col_Group, t.col_Price_1, t.col_Price_2, t.col_Price_3, t.col_Price_4, t.col_Price_5, t.col_Visible
FROM tbl_Test t, tbl_Products p
WHERE p.col_ArticleNr = t.col_ArticleNr AND p.col_Group = 'CPU'
Lätt som en plätt :)
------------------
"There's no such thing as a stupid question, only stupid people"
TtleeMedlem sedan mars 2001290 inlägg så kunde man göra också ja.. ;)
tackar..!
/t
------------------
the man with the golden bottle..