Jump to content
Changes to the Jaspersoft community edition download ×

Parameter Pass to SQL IN Statement


Recommended Posts

By: benjamin - chasewu

Parameter Pass to SQL IN Statement

2003-08-04 02:23

Is it possible to pass parameter to SQL IN Statement?

Such as,

 

In Report XML file,

<parameter name="InParameters" isForPrompting="true" class="java.lang.String">

<defaultValueExpression>

<![CDATA[(71,72,73,75,76,77)]]>

</defaultValueExpression>

</parameter>

 

and

 

<queryString><![CDATA[select * from test_table where some_field in $InParameters]]></queryString>

 

I have got a SQLException SQL92.

 

Thx in Advance!

 

 

 

 

By: Teodor Danciu - teodord

RE: Parameter Pass to SQL IN Statement

2003-08-04 10:38

 

Hi,

 

Try this:

 

<parameter name="InParameters" isForPrompting="true" class="java.lang.String">

<defaultValueExpression>

<![CDATA["(71,72,73,75,76,77)"]]>

</defaultValueExpression>

</parameter>

 

and

 

<queryString>

<![CDATA[select * from test_table where some_field in $P!{InParameters}]]>

</queryString>

 

I hope this helps.

Teodor

 

 

 

 

 

By: benjamin - chasewu

RE: Parameter Pass to SQL IN Statement

2003-08-04 18:20

Thx, But it is same.

what's meaning of $p!{}?

 

Ben

 

 

 

 

By: Teodor Danciu - teodord

RE: Parameter Pass to SQL IN Statement

2003-08-04 23:19

 

Hi,

 

Then what exactly is the error you get?

 

Thank you,

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...