PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Random data record get in db
Random data record get in db
Iniciado por guest, 13,abr. 2015 14:32 - 2 respuestas
Publicado el 13,abril 2015 - 14:32
i am try this code to get data radom in over data base. that database in more then 1500 record
but not get data random.
that code is give output same recode in many time run this code...
please help me.

SELECT
QuestionMaster.QuestionMasterID AS QuestionMasterID,
QuestionMaster.QM_SM_Id AS QM_SM_Id,
QuestionMaster.QM_CM_ID AS QM_CM_ID,
QuestionMaster.QM_DetailQuestion AS QM_DetailQuestion,
QuestionMaster.QM_Name AS QM_Name,
QuestionMaster.QM_AnsA AS QM_AnsA,
QuestionMaster.QM_AnsB AS QM_AnsB,
QuestionMaster.QM_AnsC AS QM_AnsC,
QuestionMaster.QM_AnsD AS QM_AnsD,
QuestionMaster.QM_CurrectAns AS QM_CurrectAns,
QuestionMaster.QM_Remark AS QM_Remark,
RANDOM( ) AS ra
FROM
QuestionMaster
WHERE
QuestionMaster.QM_SM_Id = {Param1}
AND QuestionMaster.QM_CM_ID IN ({Param2})
ORDER BY
ra ASC
LIMIT 10
Publicado el 13,abril 2015 - 14:53
Hi Vijay
did you test my sugestion in your previous post regarding this issue?

<a class="ExternalLink" rel="nofollow" target="_blank" href="http://27130.foren.mysnip.de/read.php?27131,513825,514237#msg-514237">http://27130.foren.mysnip.de/read.php&hellip;</a>
Publicado el 13,abril 2015 - 19:32
thank you
sir,