webForumDet fria alternativet

Uppdatera tabell

Databaser & SQL

3 svar · 290 visningar · startad av devotion

Medlem sedan jan. 20013 582 inlägg
Frågan#1

Hej!

Jag har en fråga! ;)

Jag har en tabell

tblArticleUnit
*articleNr
*articleUnit

Kan man direct i SQL-server (kör iofs SQLExpress) göra en SQL-sats som lyfter in alla enheterna i tabellen tblArticle? Koplingen mellan tabellerna är articleNr.

tblArticle
*articleNr
*articleUnit
*articleName

Mvh
Henrik

Medlem sedan jan. 20013 582 inlägg
#2

please #2....

Medlem sedan dec. 200012 464 inlägg
#3
update tblArticle set articleUnit = 
  (select articleUnit 
      from tblArticleUnit
     where tblArticleUnit.articleNr = tblArticle.articleNr)
Medlem sedan jan. 20013 582 inlägg
#4

Tackar! :bire

Mvh
Henrik

260 ms totalt · 4 externa anrop · v20260731065814-full.1dc6f849
127 ms — deklarationer (db)
0 ms — hämta statistik (cache)
128 ms — hämta tråd, inlägg och bilagor (db)
123 ms — ändringar (db)