Showing posts with label generates. Show all posts
Showing posts with label generates. Show all posts

Tuesday, March 27, 2012

distinct: removing dups

should be a simple resolution but I'm not familiar enough...

I have the following [simplified] query which generates duplicate rows that I need to get rid of.

SELECT MY_ID, DESCRIPTION, NAME
FROM MYTABLE

When I insert the distinct command, DB2 tells me:
SQL0134N Improper use of a string column, host variable, constant, or
function "DESCRIPTION". SQLSTATE=42907

The datatype of DESCRIPTION is LONG VARCHAR and that cannot change nor the need to query that column. It seems this is preventing distinct from working. It will work without DESCRIPTION being pulled, of course, but again - I need that column.

How do I use SQL to remove the duplicates I am getting since distinct seemingly cannot be used in this scenario ? Can a "WHERE" clause somehow help ?

ThanksCan you use:SELECT MY_ID, DESCRIPTION, NAME
FROM MYTABLE
GROUP BY MY_ID, DESCRIPTION, NAME-PatP|||looks like group by doesn't like DESCRIPTION either... same error.

SQL0134N Improper use of a string column, host variable, constant, or
function "DESCRIPTION". SQLSTATE=42907

Friday, February 24, 2012

Display Reporting Services in Blackberry

Attempting to render a report in mobile blackberry. The report viewer
displays, and the report generates, but eventually freezes and no data
appears.
Blackberry 5 OS
SQL Reporting Services 2005 (SP2)
Blackberry browser with IE emulation and javascripts enabled on
client.
Any other blackberry users attempting to view reporting services?
Thanks.
RobThough I have not yet discovered the procedure for successfully
displaying a dynamic report within a reportviewer, it did discover a
work around that might be the next best thing. For a little
background, I do have reporting services integrated with sharepoint
services 3.0. A user can go to his/her web site or workspace shared
documents and build a report or subscribe to an existing report in
their list.
So, for example: Customers.rdl and it's datasource actually exist as
documents in the shared document list. This is accomplished by adding
these content types to the shared documents list.
1) I subscribed to the report using the sharepoint web form.
2) Select the report from the dropdown list in the shared documents
list.
3) Select "Manage subscriptions"
4) Set up a subscription to run "hourly" and select "web page" as the
format type.
5) Give your subscription document a name. i.e. myreport.html
5) Have the subscription sent to //<yoursharepointserverpath>/shared
documents/
Now from your blackberry browser, navigate to the name
(myreport.html).
Rob