10. november 2008 - 10:17Der er
5 kommentarer og 1 løsning
Tabel oversættelse
Hejsa
Jeg har følgende: Tabel Før 2008 Tabel Efter 2007 Cpr nr.
Tabel Før 2008 - benytter lønnummer som nøgle Tabel Efter 2008 - benytter cpr som nøgle. Tabel Cpr nr. Oversætter Lønnummer til Cpr. nummer.
Jeg har så efterfølgende dannet en relation mellem cpr og de andre tabeller, sådan at jeg finder cpr nummeret i cpr. tabellen, denne konveterer så cpr. nr. til lønnummer og finder så posterne i tabel før 2008. MEN den vil ikke tage posterne med i tabel efter 2008. Nogen som har nogle gode råd til hvordan jeg får min forspørgsel til at lykkes. Altså jeg vil gerne have en forspørgsel som tager alle poster på et cpr nummer venlig hilsen IDa Nielsen
Hmm I have thougth of that, but but but - in the futhure I have to import the list to Efter 2008, and I'm not finish importing the list Før 2008. So an update is not the right choice at the moment. I'm looking for a solution where the system is to find the cpr. number in the tabel Cpr nr. and if it dosn't have a number there - it just finds it in the tabel efter 2008
Its difficult to give a solution without really knowing more to what exactly it is your trying to do.
"Altså jeg vil gerne have en forspørgsel som tager alle poster på et cpr nummer"
Are you saying that the same CPR/Lønnummer can be in both tables?
If so then make a UNION SELECT
SELECT ..... UNION SELECT .....
you cant use query designer to make UNION selects but you can use it to get the SQL right for each seperate SELECT in the UNION select
so first get the select working for [Før 2008] using the CPR table to find the correct CP and then do then make a SELECT for the "EFTER 2008" table.
Just make sure that for each select you have the same number of output fields and with the same type. You could actually make a query for each of these selects and then make teh UNION select with these..
EG:
SELECT * FROM qyFør2008 UNION SELECT * FROM qyEfter2008
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.