ruffneck Posted June 14, 2007 Share Posted June 14, 2007 ok here is my problemi have 2 tablesprijsupdateartikelnummer, crediteurnummer, Extern_nummer, Brutoprijs(this is an empty column)levprijsExtern_nummer, Brutoprijsi want to compare Extern_nummer from prijsupdate with levprijs Extern_nummer if levprijs Externnummer = prijsupdate Extern_nummer then it needs to write levprijs Brutoprijs into prijsupdate Brutoprijs at the right Extern_nummer from prijsupdateso far i got thisUPDATE prijsupdateSET prijsupdate.Brutoprijs= (SELECT levprijs.BrutoprijsFROM levprijsWHERE prijsupdate.Extern_nummer= levprijs.Extern_nummer )but i keep getting stuck with this errorthe proces needs to run on a query that can be adjusted.if i put inUPDATE prijsupdateSET prijsupdate.Brutoprijs= (SELECT levprijs.BrutoprijsFROM levprijsWHERE prijsupdate.Extern_nummer= levprijs.Extern_nummer.pk )i need to fill in numbers each row or something, but i just want him to add all records matching without me needing to do anything, because we r talking like 250000 records here :)if someone can help me with this or tell me what to do it would be greatly appreciated Link to comment Share on other sites More sharing options...
mas_oyama Posted June 14, 2007 Share Posted June 14, 2007 I dont know what to say dude, I just tested the query I gave you yesterday, UPDATE prijsupdateSET prijsupdate.Brutoprijs = (SELECT levprijs.BrutoprijsFROM levprijsWHERE prijsupdate.Extern_nummer = levprijs.Extern_nummer ) And it work perfectly... i dont know why it doesnt work for you, but it should... Link to comment Share on other sites More sharing options...
ruffneck Posted June 14, 2007 Author Share Posted June 14, 2007 I dont know what to say dude, I just tested the query I gave you yesterday, UPDATE prijsupdateSET prijsupdate.Brutoprijs = (SELECT levprijs.BrutoprijsFROM levprijsWHERE prijsupdate.Extern_nummer = levprijs.Extern_nummer ) And it work perfectly... i dont know why it doesnt work for you, but it should... well i donno why it didn't work either i keep getting stuck with this error the proces needs to run on a query that can be adjusted. if i now save the query and run it i get a box where i can fill in the numbers 1 by 1 so they get added 1 by 1does it have anything to do with maybe field relations or primairy keys or something Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.