1. jaume
  2. Valentina Reports ADK
  3. 土, 12月 07 2019, 08:14 PM
  4.  メールで購読
Hello,

I'm trying to setup a datasource using a parameter as table name without success.

example


SELECT * FROM $P(param7)
where ID_PRESSUPOST = $P(param9)
ORDER BY LINIA

I don't know the reason why using parameter as table name fails, I get an sql error.

Is there any restriction using parameters as table name ?

Regards,

Jaume
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello Jaume,

Yes, you should use $!P(param7) instead.
$P is single-quoted, $!P - is not quoted.
コメント
There are no comments made yet.
jaume 承諾済みの回答
sql setence on datasource is
SELECT A.PRESSUPOST, A.ID_CLIENT, A.SERIE, A.DATA, A.NOM_COMERCIAL_M, A.NOM_PARTICULAR_M, A.ADRESA_M, A.ADRESA1_M, A.CODIPOSTAL_M, A.CIUTAT_M, A.PROVINCIA_M, ID_PAIS_M, A.ID_PAGAMENT AS ID_PAGAMENET_PRES, A.ID_TRANSPORTISTA as ID_TRASPORTISTA1, A.ID_REPRESENTANT AS ID_RTEPRESENTANT1, A.ID_OPERARI, A.ID_PORTS AS ID_PORTS1, A.SEVA_REFERENCIA,
B.*,C.NOM_PAIS, D.NOM_COMERCIAL as NOM_COMERCIALTRANS, E.NOM_COMERCIAL AS NOM_COMERCIALREP
FROM $!P(param6) A, SAL_CLIENTS B, GEN_PAISOS C, SAL_TRANSPORT D, SAL_REPRESENTANTS E
WHERE A.ID_CLIENT = B.ID
AND A.ID_PAIS_M = C.ID
AND A.ID_TRANSPORTISTA = D.ID
AND A.ID_REPRESENTANT = E.ID
AND A.ID = $P(param9)


notice $!P(param6)


unfortunatelly $!p(param6) value is not set to the parameter
添付ファイル
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Sorry, here’s the correct version:
$P!(param6)
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories