Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

One or more cycles have been detected in database structure.

Hi all !

I a beginner in QV. In execution time of a script of loading has received such message.

"One or more cycles have been detected in database structure. Cycles can call ambiguous results and they are necessary for avoiding. QlikView will cut a cycle (), installing one or more tables with weak links. Parametres for weaklink (??????????????) tables can be changed after script performance on page of tables of dialogue of properties of the document."

What does it mean?

Thanks

3 Replies
shumailh
Creator III
Creator III

This message is occur because the link table or the database structure which you are trying to load in qlikview is become very complex because of lots of similar fields (referential + primary) in multiple table. You need to redefine the alias of the fields which you are loading.

Can you share the script which you are trying to execute so, that i can specify you where the error lies?

Regards,
Shumail

Not applicable
Author

Hi Shumail !

My script, contains the alias in Russian. The reason can in it?

The script is below

Filials:
LOAD
?????? as ??????,
id_filial,
TA as ??
;
SQL SELECT
LTRIM(RTRIM(Filial)) +' ('+CONVERT(CHAR(10),CURDATE,105)+')' as ??????,
Id as id_filial,
CURDATE as TA
FROM MegaBase.dbo.SprFilial
WHERE ID NOT IN ('BO','HT')
;

Move:
LOAD
filcode as codecust_MB,
dt as ????,
art as ???,
OutcS as ???????????,
RetS as ?????????????
;
SQL select
c.filcode,
mp.dt,
mp.art,
mp.OutcS,
mp.RetS
from dbo.SprCustomers c
join dbo.OPT_Move mp on c.id=mp.custid
where (LEFT(c.PolCode, 6) <> '/1000/')
AND (LEFT(c.PolCode, 6) <> '/-1000/')
AND (UPPER(c.ParentName) NOT IN ('??????????','??????????','_?????????? ?????','?????????'))
AND c.Firma not in ('BO','HT')
;

Goods:
LOAD
????? as ?????,
?????? as ??????,
??? as ???,
????????? as ?????????,
?????????? as ??????????,
??_???????? as ??_????????,
???_???????? as ???_????????,
??_??????????? as ??_???????????,
???_??????????? as ???_???????????,
??2_??????????? as ??2_???????????
;
SQL SELECT "???", "?????", "??????", "?????????", "??????????", "??_????????",
"???_????????", "??_???????????", "???_???????????",
"??2_???????????"
FROM MegaBase.dbo."vw_Goods_MB_MS";

Customers:
LOAD
pref_filial as id_filial,
codecust_MB,
codecust_MS,
namecust_MB as ??????,
namecust as ??????,
Code1C as ???1?,
RRPManager as ???,
UniManager as ??????????,
WallpaperManager as ????????????,
CeramicManager as ??????????????,
LightManager as ????????????,
FloorManager as ?????????????????,
BathManager as ??????????????,
Kr_Days as ??????????,
Kr_Sum as ????????????,
City as ?????,
Region as ??????
;

SQL SELECT
pref_filial,
codecust_MB,
codecust_MS,
namecust_MB,
namecust,
Code1C,
RRPManager,
UniManager,
WallpaperManager,
CeramicManager,
LightManager,
FloorManager,
BathManager,
Kr_Days,
Kr_Sum,
City,
Region
FROM dbo.vw_lnkCust_MegaBase_MapSale
;
// ????????? ???????? ??????? ?? ????? ? ?????????? 1? ????????
CONCATENATE
LOAD
pref_filial as id_filial,
codecust_MB,
codecust_MS,
namecust_MB as ??????,
namecust as ??????,
Code1C as ???1?,
RRPManager as ???,
UniManager as ??????????,
WallpaperManager as ????????????,
CeramicManager as ??????????????,
LightManager as ????????????,
FloorManager as ?????????????????,
BathManager as ??????????????,
Kr_Days as ??????????,
Kr_Sum as ????????????,
City as ?????,
Region as ??????
;
SQL SELECT
f.pref AS pref_filial,
NULL AS codecust_MB,
c.ID AS codecust_MS,
NULL AS namecust_MB,
UPPER(c.name) AS namecust,
c.Code1C Code1C ,
c.RRPManager RRPManager,
c.UniManager UniManager,
c.WallpaperManager WallpaperManager,
c.CeramicManager CeramicManager,
c.LightManager LightManager,
c.FloorManager FloorManager,
c.BathManager BathManager,
0 as Kr_Days,
0 as Kr_Sum,
COALESCE(hi.City,'?? ??????') as City,
COALESCE(hi.Region,'?? ??????')as Region
FROM dbo.Customers AS c
JOIN dbo.spr_Filials AS f ON c.FilID = f.id
JOIN dbo.TradePoints as tp on c.ID=tp.custid
JOIN dbo.TPHistory as hi on tp.id=hi.tp_id
where c.ID not in (select distinct codecust_MS FROM dbo.vw_lnkCust_MegaBase_MapSale where not (codecust_MS is null))
;

//???????????? ??????? ???????? ????? ?? ???????
MaxSquare:
LOAD
CustID as codecust_MS,
SquareTP as ??????
;
SQL SELECT
CustID,
SquareTP
FROM vw_MaxSquare
;
// ????? ???????? ???????? ?? ???????
SumSquare:
LOAD
CustID as codecust_MS,
SquareTotal as ?????
;
SQL SELECT
CustID,
SquareTotal
FROM vw_SumSquare
;
// ?????????? ???????? ???????? ?? ???????
CountSP:
LOAD
CustID as codecust_MS,
CountTP as ?????
;
SQL SELECT
CustID,
CountTP
FROM vw_CountTP
;

//?????????
Calendar:
LOAD
[date] as ????,
month as ?????,
Date(Monthstart([date]), 'MMM-YYYY') as ????????,
year as ???
;
select
[date],
month,
year
from sys_Dates
order by month_id
;
// ?????????? ?????????
Potencial:
LOAD
id as codecust_MS,
tn_sm as ??_???????????,
tv_sm as ??2_???????????,
[?????????] as ?????????,
[?????????? ?????????] as ????????????,
[??????????????? ?????????] as ???????????????,
[?????????? ??????????] as ????????????
;
SQL SELECT id,
CASE UPPER([???????? ???????????]) WHEN '?????' THEN UPPER([?????? ???????]) ELSE UPPER([???????? ???????????]) END tn_sm,
UPPER([?????? ???????]) tv_sm,
[?????????? ?????????],
[?????????],
[?????????? ??????????],
[??????????????? ?????????]
from dbo.vw_Customers2
;

shumailh
Creator III
Creator III

Sorry, I couldn't figure out where is the error actually in your code because it's in russian. Possible solution is that you need to re-check the alias of the fields that they are not repeating many times or creating complex structure because of similar field name.

Also, I am not sure that your version is supporting russian OR not. check with your vendor aswell.

Regards,
Shumail Hussain