Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Monday, March 26, 2012

problem with split function to select multiple values

When running the split function from my data pane within ssrs, or when
running it from sql server directly everything works fine.
But..when running the report in preview I receive dbo.split too many
arguments specified. I assume reporting services in some way passes it
like a string value once running the report. Otherwise it's also
noticeable the join function works fine within
code i'm using is like this within my dataset
Select myfield
from table
where field in
(
select item
from dbo.split(@.par,',')
)
The parameter passed to the split function has an 'integer value'
specified for the 'parameter value' . The split value is the well
known generic split function.If @.Par is a multivalued parameter, then try joining the items together in a
string:
Select myfield
from table
where field in
(
select item
from dbo.split(join(@.par,','),',')
)
"koopmans.johan@.hccnet.nl" wrote:
> When running the split function from my data pane within ssrs, or when
> running it from sql server directly everything works fine.
> But..when running the report in preview I receive dbo.split too many
> arguments specified. I assume reporting services in some way passes it
> like a string value once running the report. Otherwise it's also
> noticeable the join function works fine within
> code i'm using is like this within my dataset
> Select myfield
> from table
> where field in
> (
> select item
> from dbo.split(@.par,',')
> )
> The parameter passed to the split function has an 'integer value'
> specified for the 'parameter value' . The split value is the well
> known generic split function.
>|||Update to my previous post, the parameter to the split function must be a
varchar parameter as this will be sent through as a single comma separated
string list to the function.
"koopmans.johan@.hccnet.nl" wrote:
> When running the split function from my data pane within ssrs, or when
> running it from sql server directly everything works fine.
> But..when running the report in preview I receive dbo.split too many
> arguments specified. I assume reporting services in some way passes it
> like a string value once running the report. Otherwise it's also
> noticeable the join function works fine within
> code i'm using is like this within my dataset
> Select myfield
> from table
> where field in
> (
> select item
> from dbo.split(@.par,',')
> )
> The parameter passed to the split function has an 'integer value'
> specified for the 'parameter value' . The split value is the well
> known generic split function.
>|||Branden, sorry for taking your time...I've been using a direct query
within SSRS so there was no need for the split (this explains the
error). I tend to use SP's or cubes regularly and confused the way
they handle parameters with a direct query i'm using now. So this is
the simple solution
Select myfield
from table
where field in
(
@.par
)

Friday, March 23, 2012

Problem with SP3 JDBC Driver for SQL Server

Hi,
I noticed an interesting behaviour. When the autoCommit is turned off, I am not able to use the same connection handle to create multiple Statement/PreparedStatement handles.It goes into Manual Transaction Mode and says cannot clone connections.
Is this a bug? Can someone give some pointers here.
thanks
Shreyas
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
You need to add a property to the code that's making your connection:
selectMethod=cursor
Joe Weinstein at BEA
shreyask@.gmail.com wrote:
> Hi,
> I noticed an interesting behaviour. When the autoCommit is turned off, I am not able to use the same connection handle to create multiple Statement/PreparedStatement handles.It goes into Manual Transaction Mode and says cannot clone connections.
> Is this a bug? Can someone give some pointers here.
> thanks
> Shreyas
> ************************************************** ********************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||You need to add a property to the code that's making your connection:
selectMethod=cursor
Joe Weinstein at BEA
shreyask@.gmail.com wrote:
> Hi,
> I noticed an interesting behaviour. When the autoCommit is turned off, I am not able to use the same connection handle to create multiple Statement/PreparedStatement handles.It goes into Manual Transaction Mode and says cannot clone connections.
> Is this a bug? Can someone give some pointers here.
> thanks
> Shreyas
> ************************************************** ********************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Shreyas Kaushik (shreyask@.gmail.com) wrote in message news:<eMtbpzUxEHA.2564@.TK2MSFTNGP12.phx.gbl>...
> Hi,
> I noticed an interesting behaviour. When the autoCommit is turned off, I am not able to use the same connection handle to create multiple Statement/PreparedStatement handles.It goes into Manual Transaction Mode and says cannot clone connections.
> Is this a bug? Can someone give some pointers here.
> thanks
> Shreyas
> ************************************************** ********************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
This is one of the number of unfortunate consequences of the fact that
the driver silently creates >1 connection to the database when you
create > 1 statement. This is an example of what I was referring to in
my post in this group on 10/27 comparing the free MS driver to
comercial drivers.
So, well, yes its free but you have to deal with issues like this
one.. I guess you get what you pay for..