Re: Query success in Query Analyzer but not in Reporting Services?
- From: "anonymous_user@xxxxxxxxxxxxxxxxxxxxxxx" <anonymous_user@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Nov 2006 02:00:05 GMT
Thanks Bruce this was most helpful
Phillip McLennan
OK, first this will not work. In RS you can use the generic query designer.
and this will execute BUT you are also dropping the temp table so now it
doesn't exist which is why it isn't working for you (RS is also doing behind
the scenes work on the schema and dropping the temp tables messes this up).
It might work if you don't have the drop table but then when you execute it
again they might still be around.
When you did a stored procedure this should work. Don't drop the temp
tables, let them fall out of scope naturally.
Doing a stored procedure pick the type as stored procedure and pick the
command type as stored procedure (you will need to not use the report
wizard, just create a new dataset). For the text put in just the name of the
stored procedure, for instance: pr_mystoredprocedure
RS will detect the parameters and handle it all for you, creating report
parameters.
BTW, don't hesitate to post in the SQL Server MVP newsgroup. I hang out
there and so do several others that know RS.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jamie MacLennan (MS)" <jamiemac@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:4398aed9$1@xxxxxxxxxxxxxxxxxxxxx
Forwarding to RS group.
--
-Jamie MacLennan
SQL Server Data Mining
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Rory" <mccawr'nospam'@rogers.com> wrote in message
news:5cOdnSKZOtAl4wXeRVn-hg@xxxxxxxxxxxxx
I am struggling with a query that is giving me different results when run
in
Query Analyzer as opposed to when it is run in Report Designer.
When I run the following query in QA, and obviously declare and set the
parameters first. Wonderful - the expected results are returned in the
grid
pane. However when I run the query in Report Designer and provide the
parameters in the Define Query Parameters dialog box, I receive the
message
"x rows affected by last query" and click OK but I don't see any output
in
the grid pane????
SELECT ComputerDomain, ComputerName, NTEventID, Source, message,
TimeGenerated
INTO TMPLDAPBIND
FROM SDKEventView
WHERE [NTEventID] = 21001 AND [Source] = 'AD Client Connectivity' AND
[ComputerDomain] = 'RCI' AND [TimeGenerated] > @stime AND
[TimeGenerated] < @etime AND [ComputerName] = @DC
AND
[Message] LIKE 'The bind to%'
(SELECT ComputerDomain, ComputerName,
CONVERT(INT, replace(substring(Message, 5 + (CHARINDEX('took', Message)),
5), 'm', '')) AS TLDAP,
Message, TimeGenerated
INTO LDAPBIND
FROM TMPLDAPBIND)
(SELECT *
FROM LDAPBIND) DROP TABLE TMPLDAPBIND
DROP TABLE LDAPBIND
I have also tried to run this in a stored procedure but that fails with
the
message "Procedure has no parameters and arguments were supplied".
Any ideas or suggestions would be most welcome and I greatly appreciate
and
thank you in advance!!!
Rory McCaw
MOM MVP
Blog: http://spaces.msn.com/members/RoryMcCaw/
This is a cross-post, i have also posted to
microsoft.public.sqlserver.reportingsvcs
- Prev by Date: Quality Assurance in Data Warehouses
- Next by Date: Stop smoking zyban
- Previous by thread: Quality Assurance in Data Warehouses
- Next by thread: Stop smoking zyban
- Index(es):
Relevant Pages
|