Subject | Re: PreparedStatement and group by ? |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-03-26T06:57:21Z |
> I have a PreparedStatement and I would like to have a place holderI'm almost 100% sure that it is not possible. You have to either
> in the group by clause. I have looked around and it looks like I
> need a bind variable instead of a place holder. Is there anyway
> with FirebirdSQL to use a bind variable and then pass the proper
> value in based on some user input?
>
> I tried this:
>
> select * from customers where order by ?
>
> It looks like this might work but I am not sure if I can set the
> bind variable dynamically:
>
> select * from customers where order by :column
>
> Is this possible? Thanks.
re-prepare your statement each time your condition changes or prepare
all possible combinations on the beginning and use appropriate when
needed. However ask in Firebird-Support and try it yourself, maybe
there's very little chance that Firebird supports this.
Roman