Showing posts with label filtering. Show all posts
Showing posts with label filtering. Show all posts

Saturday, February 25, 2012

complex join replication filtering is not working in 3.5 beta

Hi,

I have a complex join filtering on a replicated sql server database which was working fine in previous versions of sql compact. The query is something like the following:

SELECT <published columns> FROM <filtered table> INNER JOIN <child table> ON <child table>.ID = <filtered table>.ID and <child table>.date > getdate()-30

After I upgraded to compact databse 3.5, for some weird reason whichever tables have both these Join filter and article filter together behaving improperly. If I insert any row in any of these table, the row is replicated properly to the server, but it does not send the new row to any other users. Again this thing works fine in older version. I have switched back tyo the old version of sql ce and again it's started working.

please help.

|||

You have to let us know a little more about your environment. - SQL Server version and SP level. Which version of Server Tools (sqlcesaxx.dll) are you using. And so on.

|||

Microsoft SQL Server Standard Edition (64-bit)
Version: 9.00.2047.00
OS: Windows 2003

sqlcesa35.dll version:

3.5.5365.0

|||

For Merge replication, it is important that you use SQL Server 2005 SP2. Try to install this, if the problem persists, log the problem at connect.microsoft.com/sqlserver

Friday, February 24, 2012

complex join replication filtering is not working in 3.5 beta

Hi,

I have a complex join filtering on a replicated sql server database which was working fine in previous versions of sql compact. The query is something like the following:

SELECT <published columns> FROM <filtered table> INNER JOIN <child table> ON <child table>.ID = <filtered table>.ID and <child table>.date > getdate()-30

After I upgraded to compact databse 3.5, for some weird reason whichever tables have both these Join filter and article filter together behaving improperly. If I insert any row in any of these table, the row is replicated properly to the server, but it does not send the new row to any other users. Again this thing works fine in older version. I have switched back tyo the old version of sql ce and again it's started working.

please help.

|||

You have to let us know a little more about your environment. - SQL Server version and SP level. Which version of Server Tools (sqlcesaxx.dll) are you using. And so on.

|||

Microsoft SQL Server Standard Edition (64-bit)
Version: 9.00.2047.00
OS: Windows 2003

sqlcesa35.dll version:

3.5.5365.0

|||

For Merge replication, it is important that you use SQL Server 2005 SP2. Try to install this, if the problem persists, log the problem at connect.microsoft.com/sqlserver

complex join replication filtering is not working in 3.5 beta

Hi,

I have a complex join filtering on a replicated sql server database which was working fine in previous versions of sql compact. The query is something like the following:

SELECT <published columns> FROM <filtered table> INNER JOIN <child table> ON <child table>.ID = <filtered table>.ID and <child table>.date > getdate()-30

After I upgraded to compact databse 3.5, for some weird reason whichever tables have both these Join filter and article filter together behaving improperly. If I insert any row in any of these table, the row is replicated properly to the server, but it does not send the new row to any other users. Again this thing works fine in older version. I have switched back tyo the old version of sql ce and again it's started working.

please help.

|||

You have to let us know a little more about your environment. - SQL Server version and SP level. Which version of Server Tools (sqlcesaxx.dll) are you using. And so on.

|||

Microsoft SQL Server Standard Edition (64-bit)
Version: 9.00.2047.00
OS: Windows 2003

sqlcesa35.dll version:

3.5.5365.0

|||

For Merge replication, it is important that you use SQL Server 2005 SP2. Try to install this, if the problem persists, log the problem at connect.microsoft.com/sqlserver

complex join replication filtering is not working in 3.5 beta

Hi,

I have a complex join filtering on a replicated sql server database which was working fine in previous versions of sql compact. The query is something like the following:

SELECT <published columns> FROM <filtered table> INNER JOIN <child table> ON <child table>.ID = <filtered table>.ID and <child table>.date > getdate()-30

After I upgraded to compact databse 3.5, for some weird reason whichever tables have both these Join filter and article filter together behaving improperly. If I insert any row in any of these table, the row is replicated properly to the server, but it does not send the new row to any other users. Again this thing works fine in older version. I have switched back tyo the old version of sql ce and again it's started working.

please help.

|||

You have to let us know a little more about your environment. - SQL Server version and SP level. Which version of Server Tools (sqlcesaxx.dll) are you using. And so on.

|||

Microsoft SQL Server Standard Edition (64-bit)
Version: 9.00.2047.00
OS: Windows 2003

sqlcesa35.dll version:

3.5.5365.0

|||

For Merge replication, it is important that you use SQL Server 2005 SP2. Try to install this, if the problem persists, log the problem at connect.microsoft.com/sqlserver

complex join replication filtering is not working in 3.5 beta

Hi,

I have a complex join filtering on a replicated sql server database which was working fine in previous versions of sql compact. The query is something like the following:

SELECT <published columns> FROM <filtered table> INNER JOIN <child table> ON <child table>.ID = <filtered table>.ID and <child table>.date > getdate()-30

After I upgraded to compact databse 3.5, for some weird reason whichever tables have both these Join filter and article filter together behaving improperly. If I insert any row in any of these table, the row is replicated properly to the server, but it does not send the new row to any other users. Again this thing works fine in older version. I have switched back tyo the old version of sql ce and again it's started working.

please help.

|||

You have to let us know a little more about your environment. - SQL Server version and SP level. Which version of Server Tools (sqlcesaxx.dll) are you using. And so on.

|||

Microsoft SQL Server Standard Edition (64-bit)
Version: 9.00.2047.00
OS: Windows 2003

sqlcesa35.dll version:

3.5.5365.0

|||

For Merge replication, it is important that you use SQL Server 2005 SP2. Try to install this, if the problem persists, log the problem at connect.microsoft.com/sqlserver

Complex Dataset Filtering

I have an Item Report that lists over 50,000 items, we need to restrict using
one of several different methods.
Some times they will run the report with all items (no Where clause in
the SQL Statement).
Some times they will want to see only the items they call "common"
which are stored in a table (normally I would just do a join to that table).
Lastly, they want to run the report for a specific item (where Item = @.ItemNumber)
I would prefer not to create three different reports.
My first hope was to create all three datasets and then dynamically assigne
the dataset depending on a paramater, I have not been able to accomplish this.
Any suggestion would sure be great.
TerryPiece of cake...well, not at all. I don't have the time to write a specific
answer right now, but I promise that next week I will do it.
By now, I'll copy-paste an answer that I gave in another forum. I hope it
helps you:
My scenario was the following.
I had a parameterized report. There's only one parameter (called @.id_acm)
and the values are taken from a query (in the report>report parameters...
menu I choose "From Query" instead of "non-queried" and so a drop down list
is shown to the user) The source query for the parameter values looked like
this:
SELECT id_acm AS param_value, nombre AS param_label
FROM tbl_acm
And the query used to get the information for the report (the one I wrote in
the DataSet) looked like this:
SELECT *
FROM tbl_sales S
INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acm
WHERE acm.id_acm = @.id_acm
I also did NOT specified any default value for the parameter.
When my boss executed the report he noticed that it showed anything until he
selected a value from the drop down list. My boss told me that he wanted to
see all the information by default, and if he needed information about a
specific person he would select the person from the drop down list. Here
comes the tricky part.
I noticed that all the current (and future) values for the id_acm field in
the tbl_acm table were greater than 0.
So I modified the source query for the parameter like this:
SELECT -5 AS param_value, 'Everyone' AS param_label
UNION
SELECT id_acm AS param_value, nombre AS param_label
FROM tbl_acm
And I specified a default value of -5 for the @.id_acm parameter.
Also, I modified the principal query like this:
IF @.id_acm = -5
BEGIN
SELECT *
FROM tbl_sales S
INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
END ELSE
BEGIN
SELECT *
FROM tbl_sales S
INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
WHERE acm.id_acm = @.id_acm
END
Let me explain this: when the user selects "Everyone" the principal query
returns the information of all the persons (because there's no WHERE clause)
If the user selects a specific name, then the principal query returns only
that person's information (because there's a WHERE clause filtering the data)
By default the paramter value is -5 and so the report shows everyone's
information.
Of course, if you have 2 parameters you'll have to nest 2 IF statemens. In
fact, if you have n parameters you'll have to nest n IF statemens and you'll
get 2^n posibilities for the WHERE clauses (that's the big pain)
I don't know if this helps in your scenario, but I hope it does.|||U Rock! That toally solved my problem.
I tried something simular prior but I really used more of a SQL Notation.
Thanks, I had all but givin up!
"F. Dwarf" wrote:
> Piece of cake...well, not at all. I don't have the time to write a specific
> answer right now, but I promise that next week I will do it.
> By now, I'll copy-paste an answer that I gave in another forum. I hope it
> helps you:
> My scenario was the following.
> I had a parameterized report. There's only one parameter (called @.id_acm)
> and the values are taken from a query (in the report>report parameters...
> menu I choose "From Query" instead of "non-queried" and so a drop down list
> is shown to the user) The source query for the parameter values looked like
> this:
> SELECT id_acm AS param_value, nombre AS param_label
> FROM tbl_acm
> And the query used to get the information for the report (the one I wrote in
> the DataSet) looked like this:
> SELECT *
> FROM tbl_sales S
> INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acm
> WHERE acm.id_acm = @.id_acm
> I also did NOT specified any default value for the parameter.
> When my boss executed the report he noticed that it showed anything until he
> selected a value from the drop down list. My boss told me that he wanted to
> see all the information by default, and if he needed information about a
> specific person he would select the person from the drop down list. Here
> comes the tricky part.
> I noticed that all the current (and future) values for the id_acm field in
> the tbl_acm table were greater than 0.
> So I modified the source query for the parameter like this:
> SELECT -5 AS param_value, 'Everyone' AS param_label
> UNION
> SELECT id_acm AS param_value, nombre AS param_label
> FROM tbl_acm
> And I specified a default value of -5 for the @.id_acm parameter.
> Also, I modified the principal query like this:
> IF @.id_acm = -5
> BEGIN
> SELECT *
> FROM tbl_sales S
> INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
> END ELSE
> BEGIN
> SELECT *
> FROM tbl_sales S
> INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
> WHERE acm.id_acm = @.id_acm
> END
> Let me explain this: when the user selects "Everyone" the principal query
> returns the information of all the persons (because there's no WHERE clause)
> If the user selects a specific name, then the principal query returns only
> that person's information (because there's a WHERE clause filtering the data)
> By default the paramter value is -5 and so the report shows everyone's
> information.
> Of course, if you have 2 parameters you'll have to nest 2 IF statemens. In
> fact, if you have n parameters you'll have to nest n IF statemens and you'll
> get 2^n posibilities for the WHERE clauses (that's the big pain)
> I don't know if this helps in your scenario, but I hope it does.|||What I do in my reports is something like
SELECT * FROM tbl_sales S
INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acm
WHERE (acm.id_acm = @.id_acm or @.id_acm = -5)
"Terry B" wrote:
> U Rock! That toally solved my problem.
> I tried something simular prior but I really used more of a SQL Notation.
> Thanks, I had all but givin up!
>
> "F. Dwarf" wrote:
> > Piece of cake...well, not at all. I don't have the time to write a specific
> > answer right now, but I promise that next week I will do it.
> > By now, I'll copy-paste an answer that I gave in another forum. I hope it
> > helps you:
> >
> > My scenario was the following.
> > I had a parameterized report. There's only one parameter (called @.id_acm)
> > and the values are taken from a query (in the report>report parameters...
> > menu I choose "From Query" instead of "non-queried" and so a drop down list
> > is shown to the user) The source query for the parameter values looked like
> > this:
> >
> > SELECT id_acm AS param_value, nombre AS param_label
> > FROM tbl_acm
> >
> > And the query used to get the information for the report (the one I wrote in
> > the DataSet) looked like this:
> > SELECT *
> > FROM tbl_sales S
> > INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acm
> > WHERE acm.id_acm = @.id_acm
> >
> > I also did NOT specified any default value for the parameter.
> >
> > When my boss executed the report he noticed that it showed anything until he
> > selected a value from the drop down list. My boss told me that he wanted to
> > see all the information by default, and if he needed information about a
> > specific person he would select the person from the drop down list. Here
> > comes the tricky part.
> > I noticed that all the current (and future) values for the id_acm field in
> > the tbl_acm table were greater than 0.
> > So I modified the source query for the parameter like this:
> >
> > SELECT -5 AS param_value, 'Everyone' AS param_label
> > UNION
> > SELECT id_acm AS param_value, nombre AS param_label
> > FROM tbl_acm
> >
> > And I specified a default value of -5 for the @.id_acm parameter.
> > Also, I modified the principal query like this:
> >
> > IF @.id_acm = -5
> > BEGIN
> > SELECT *
> > FROM tbl_sales S
> > INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
> > END ELSE
> > BEGIN
> > SELECT *
> > FROM tbl_sales S
> > INNER JOIN tbl_acm acm ON S.id_acm = acm.id_acb
> > WHERE acm.id_acm = @.id_acm
> > END
> >
> > Let me explain this: when the user selects "Everyone" the principal query
> > returns the information of all the persons (because there's no WHERE clause)
> > If the user selects a specific name, then the principal query returns only
> > that person's information (because there's a WHERE clause filtering the data)
> > By default the paramter value is -5 and so the report shows everyone's
> > information.
> > Of course, if you have 2 parameters you'll have to nest 2 IF statemens. In
> > fact, if you have n parameters you'll have to nest n IF statemens and you'll
> > get 2^n posibilities for the WHERE clauses (that's the big pain)
> > I don't know if this helps in your scenario, but I hope it does.