Jump to content

SQL Server + GridView


NunoOliveira1977
 Share

Recommended Posts

Boa tarde,

Tenho a seguinte dúvida:

- 2 tabelas SQL Server

rg_alertas rg_alertas_paises

------------------ ----------------------------

cod_alerta <-------------> cod_alerta

patologia pais

medida regiao

como dados nas tabelas, tenho:

rg_alertas

----------------------------------------------------------------

cod_alerta | patologia | medida

-------------------------------------------------------------------

1 | patologia teste 1 | medida teste 1

2 | patologia teste 2 | medida teste 2

rg_alertas_paises

----------------------------------------------------------

cod_alerta | pais | regiao

----------------------------------------------------------

1 | Portugal | Algarve

1 | Espanha | Andaluzia

1 | Italia | Corsega

2 | Roménia | Não definida

Resumindo, cada cod_alerta pode ter 1 ou mais registos associados na tabela rg_alertas_paises.

O que pretendia era colocar esta informação, num gridview, da seguinte forma:

gv_Alertas

-------------------------------------------------------------------------------------------------------------------------

cod_alerta | Pais/Regiao | Patologia | Medida

-------------------------------------------------------------------------------------------------------------------------

1 | Portugal (Algarve), Espanha (Anda | Patologia Teste 1 | Medida Teste 1

| luzia), Italia (Corsega) | |

--------------------------------------------------------------------------------------------------------------------------

2 | Roménia (Não definida) | Patologia Teste 2 | Medida Teste 2

--------------------------------------------------------------------------------------------------------------------------

Alguém me consegue ajudar? Tenho andado às voltas e voltas e não consigo implementar.

Obrigado.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.