QUERY dont match VENETO

User avatar
sal21
PlatinumLounger
Posts: 4357
Joined: 26 Apr 2010, 17:36

QUERY dont match VENETO

Post by sal21 »

QUERY dont match VENETO, WHY!!!

Run query1
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: QUERY dont match VENETO

Post by HansV »

What do you mean?

S2509.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4357
Joined: 26 Apr 2010, 17:36

Re: QUERY dont match VENETO

Post by sal21 »

HansV wrote:
24 Feb 2024, 10:10
What do you mean?


S2509.png
YES.
the code of this REGIONE is 05

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: QUERY dont match VENETO

Post by HansV »

The query returns REG from SAM_REGIONI:

Code: Select all

SELECT SAM_REGIONI.REG, SAM_REGIONI.REGIONE
FROM SAM_REGIONI INNER JOIN REGIONI ON SAM_REGIONI.REGIONE = REGIONI.REGIONE;
The code of VENETO in SAM_REGIONI is 0, not 5:

S2510.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4357
Joined: 26 Apr 2010, 17:36

Re: QUERY dont match VENETO

Post by sal21 »

HansV wrote:
24 Feb 2024, 10:46
The query returns REG from SAM_REGIONI:

Code: Select all

SELECT SAM_REGIONI.REG, SAM_REGIONI.REGIONE
FROM SAM_REGIONI INNER JOIN REGIONI ON SAM_REGIONI.REGIONE = REGIONI.REGIONE;
The code of VENETO in SAM_REGIONI is 0, not 5:


S2510.png
OK.
But i need to update reg and reg1 in SAM_REGIONI with a mtach REGIONI<>REGIONI

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: QUERY dont match VENETO

Post by HansV »

UPDATE SAM_REGIONI INNER JOIN REGIONI ON SAM_REGIONI.REGIONE = REGIONI.REGIONE SET SAM_REGIONI.REG = [REGIONI].[REG], SAM_REGIONI.REG1 = [REGIONI].[REG1];
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: QUERY dont match VENETO

Post by HansV »

And? Does it work?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4357
Joined: 26 Apr 2010, 17:36

Re: QUERY dont match VENETO

Post by sal21 »

HansV wrote:
24 Feb 2024, 14:29
And? Does it work?
yes. tks