I have the following SQL query
SELECT
pmma_vt_feldmarkposition.vtvt_recn AS [li_verträge_recn],
pmma_vt_feldmarkposition.feldmark AS [vt_feldmark_nr_pflanze],
switch (gbs is null, gbs_opti, gbs is not null, gbs) AS [ta_istbeitragssatz_hagel],
NZ(pmma_vt_feldmarkposition.ebs_sturm, 0) + NZ(pmma_vt_feldmarkposition.ebs_frost, 0) + NZ(pmma_vt_feldmarkposition.ebs_wolkenbruch, 0) + NZ(pmma_vt_feldmarkposition.ebs_hochwasser, 0) + NZ(pmma_vt_feldmarkposition.ebs_trockenheit, 0) + NZ(pmma_vt_feldmarkposition.ebs_pauschal, 0) AS [ta_istbeitragssatz_elementar],
switch (gbs is null, gbs_opti, gbs is not null, soll_gbs) AS [ta_sollbeitragssatz_hagel]
INTO
vrt_feldmarkpositionen
FROM
PMMA_VT_FELDMARKPOSITION
WHERE
pmma_vt_feldmarkposition.lfd_nr * 1000000000 + pmma_vt_feldmarkposition.vtvt_recn
IN (
SELECT MIN(pmma_vt_feldmarkposition.lfd_nr * 1000000000 + pmma_vt_feldmarkposition.vtvt_recn) AS minhelper
FROM pmma_vt_feldmarkposition
GROUP BY pmma_vt_feldmarkposition.vtvt_recn
);
pmma_vt_feldmarkposition used to be linked to my ODBC database and the query was running without problems. Now, I converted the link to a local table (also named pmma_vt_feldmarkposition, removed the link to the database) to be able to work offline - but the query keeps running forever without finishing. I do not receive any kind of error message.
What could be the reason for this? Could it be because my .accdb file is 1,8GB large now? (I saved a few more local tables and already used the "compact and repair" function)
PMMA_VT_FELDMARKPOSITIONto a separate Access database. Then, in your current database, makePMMA_VT_FELDMARKPOSITIONa link to that table in the other database. - HansUp