SQL Server CE Update table from another table -


having trouble trying adjust simple update 1 table another:

update t2  set country_fk = t1.country_id  dbo.countrycity t2 inner join dbo.country t1 on t2.country = t1.iso 

doing bit of research, sql server ce not from clause in join.

i can't seem syntax right work on sql server ce.

any suggestion more welcome.

thanks!!

yes, according sql ce reference, from clauses not supported in update. nor can update countrycity set country_fk = (select country_id country... because set accepts scalar , select returns selection.

you have assign first or value from

select country_id country c inner join countrycity cc on cc.country = c.iso need here specify 1 country instead of every country has matching iso 

to countrycity.country_fk country = same country specified above

this has done in whatever script or application calling sql command, cannot done inside sql ce.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -