Showing posts with label struggling. Show all posts
Showing posts with label struggling. Show all posts

Tuesday, March 27, 2012

Derived Tables and joining to them

I am struggling with some syntax. I have created a couple of derived tables
and now want to LEFT OUTER JOIN to them. Can someone help me?
Thanks in advance.
Here's the SQL...
SELECT DERIVE1A.column_1,
DERIVE1A.column_2,
DERIVE1A.column_3,
DERIVE1A.column_4,
DERIVE1A.column_5,
DERIVE2A.column_1,
DERIVE2A.column_2,
DERIVE2A.column_3,
DERIVE2A.column_4,
DERIVE2A.column_5
FROM #tbl_Export tbl_Export,
(SELECT column_1,
column_2,
column_3,
column_4,
column_5
FROM #tbl_Export tbl_export_1
WHERE column_x = 'f') DERIVE1,
(SELECT column_1,
column_2,
column_3,
column_4,
column_5
FROM #tbl_Export tbl_export_1
WHERE column_x = 's') DERIVE2,
LEFT OUTER JOIN DERIVE1 DERIVE1A
ON tbl_Export.key_column = DERIVE1A.key_column
LEFT OUTER JOIN DERIVE2 DERIVE2A
ON tbl_Export.key_column = DERIVE2A.key_column
wnfisbaStart by checking the syntax and examples from SQL Server Books Online.
Based on the sample code you posted, you could re-write it along the lines
of:
SELECT *
FROM tbl t1
LEFT OUTER JOIN
( SELECT col1, col2, ...... ) derived_1
ON t1.key = derived_1.col1
LEFT OUTER JOIN
( SELECT col1, col2, ...... ) derived_2
ON t1.key = derived_2.col2 ;
Anith

Thursday, March 22, 2012

Deployment problem to production server

I just started using reporting services and have a set of reports done that works on VS2005, however I am struggling with how to deploy this to a production server. The production server does not have a public presnet on the web. If I copy the directory to the production machine it does not work. I realzie that somehow I need to update the report database on the production machine but am lost about how to do that if I cannot connect to the machine from VS2005. I also tried the upload function in report manager.

How do I get my reports onto this box? Surely there is a way to do this without having to have a connection from VS2005. If you do applications that you want to ship to remote users there must be a way to do this.

Thanks

Chuck

In an effort to see how this works I took the reports database from my devleopment machine and installed it onto the server using SQL backup / restore. Does this break the reports database? Do I have to uninstall the reporting services using the SQL install tool or is there a way to recreate the database without doing the SQL uninstall reinstall?

Thanks

Chuck