Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: parameter in sql statement Post Reply Post New Topic
Author Message
marius
Newbie
Newbie


Joined: 09 Oct 2008
Online Status: Offline
Posts: 7
Quote marius Replybullet Topic: parameter in sql statement
    Posted: 09 Oct 2008 at 8:00am
hi! i have something like this in a sql expression

(
select
    `table_name`.`a_field_name`
from
    `table_name`
where
    `table_name`.`another_field_name`='parameter'
)

where the parameter is defined in the parameter fields.

i tried to put the parameter like this {?parameter} but it still doesn't work.

can anyone help me?
IP IP Logged
JohnT
Groupie
Groupie
Avatar

Joined: 20 Jan 2008
Online Status: Offline
Posts: 92
Quote JohnT Replybullet Posted: 09 Oct 2008 at 11:49am
I have a query that shows the parameter as {?parameter} but you say that doesn't work for you.  What kind of error are you getting ?  Does the query not return any data or are you getting a syntax error ?  What kind of database are you using ?
 
 
IP IP Logged
marius
Newbie
Newbie


Joined: 09 Oct 2008
Online Status: Offline
Posts: 7
Quote marius Replybullet Posted: 09 Oct 2008 at 11:08pm
i don't have a syntax error, but the query returns nothing. i'm using a mysql database.
IP IP Logged
Annaliza
Newbie
Newbie


Joined: 03 Oct 2008
Online Status: Offline
Posts: 2
Quote Annaliza Replybullet Posted: 10 Oct 2008 at 7:20am
That syntax is used for Crystal Reports...do you have the parameters defined in the parameter fields section?
 
Otherwise, in a sql script, you could use &&parametername to get sql to ask you to input the data...
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.