05. januar 2007 - 10:09Der er
14 kommentarer og 1 løsning
Update med select
Hey alle,
Er der nogen der kan hjälpe? Jeg vil lave en SQL update men den skal også hente mere data fra en tabell.
sSQL = "UPDATE tblTemp SET tmpBeloppMånad = (SELECT VAL(SUM(COL.[UNIT_PRICE])) FROM [dbo_AMF_VW_COMMRAPP_INST] AS COL) WHERE tmpKundnummer = txtKundnummer" DoCmd.RunSQL sSQL
Denne virker ikke men er der nogen der har en idé?
try copying the SQL into a query wher it will be easier to see the problem. I dont quite understand your WHERE. are both field sin the same table (tmpKundnummer and txtKundnummer) or is txtKundnummer maybe on a form?
If its on a form then try
sSQL = "UPDATE tblTemp SET tmpBeloppMånad = (SELECT VAL(SUM(COL.[UNIT_PRICE])) FROM [dbo_AMF_VW_COMMRAPP_INST] AS COL) WHERE tmpKundnummer = " & txtKundnummer
and if tmpKundnummer is a of type text then use
sSQL = "UPDATE tblTemp SET tmpBeloppMånad = (SELECT VAL(SUM(COL.[UNIT_PRICE])) FROM [dbo_AMF_VW_COMMRAPP_INST] AS COL) WHERE tmpKundnummer = '" & txtKundnummer & "'"
How can i put that into the update statement? This won´t work: sSQL = "UPDATE tblTemp SET tmpBeloppMånad = DSUM("[UNIT_PRICE]", "[dbo_AMF_VW_COMMRAPP_INST]", "[CUSTOMER_NO]= '" & tmpKundnummer & "'")"
Hi rickie Either you are not using the correct email address, or you have a problem with your mail server. Normally I have no problem receiving emails, so I'm sure the problem is at your end. Can you upload to an FTP site?
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.