Showing posts with label production. Show all posts
Showing posts with label production. Show all posts

Wednesday, March 28, 2012

Replacing a NULL in a view

I have created a view over a table that extracts production
information. The undelying table contains rows not just for product
code changed but also for speed changes.
The folloing view fillers out the speed changes and seems to work bar
one small problem. The EndTime for the currently running product will
be NULL as it is still running. This is a proble as I miss the current
production information. Is there a way to make the EndTime NULL in the
MAX function if the table value is NULL or could NULL be replaced with
the current Datetime
SELECT TOP 100 PERCENT *, DATEDIFF(hh, StartTime, EndTime) AS
HoursRun
FROM (SELECT Unit, Line, ProductCode, MIN(StartTime) AS
StartTime, MAX(EndTime) AS EndTime
FROM D_ProductionLog
GROUP BY Unit, Line, ProductCode) ProdLog
ORDER BY StartTime, Unit, Line, ProductCode
Many thanks
JimYou can use ISNULL to provide a different value for one that is NULL.
for example
SELECT TOP 100 PERCENT *, DATEDIFF(hh, StartTime, EndTime) AS
HoursRun
FROM (SELECT Unit, Line, ProductCode, MIN(StartTime) AS
StartTime, ISNULL(MAX(EndTime), GETDATE()) AS EndTime
FROM D_ProductionLog
GROUP BY Unit, Line, ProductCode) ProdLog
ORDER BY StartTime, Unit, Line, ProductCode
--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.
"Jim" <jim.holmes@.devro-casings.com> wrote in message
news:68dfae14.0307230512.64cddbc6@.posting.google.com...
> I have created a view over a table that extracts production
> information. The undelying table contains rows not just for product
> code changed but also for speed changes.
> The folloing view fillers out the speed changes and seems to work bar
> one small problem. The EndTime for the currently running product will
> be NULL as it is still running. This is a proble as I miss the current
> production information. Is there a way to make the EndTime NULL in the
> MAX function if the table value is NULL or could NULL be replaced with
> the current Datetime
> SELECT TOP 100 PERCENT *, DATEDIFF(hh, StartTime, EndTime) AS
> HoursRun
> FROM (SELECT Unit, Line, ProductCode, MIN(StartTime) AS
> StartTime, MAX(EndTime) AS EndTime
> FROM D_ProductionLog
> GROUP BY Unit, Line, ProductCode) ProdLog
> ORDER BY StartTime, Unit, Line, ProductCode
> Many thanks
> Jim

Monday, March 26, 2012

replace table with different datasource in dsv

HI all,

I've used test db which is the small portion of production db and now I'm trying to replace all tables with production db in dsv. But it gives an OLE DB error now. (but I checked it and nothing wrong with it.)

What should I check when replacing table with differenct db?

Do I check the data source references in ds?

Please give me some comments.

Thanks in advance.

If the table names and schema names (on which you built dimensions, cubes and partitions) are the same in the test and production databases, the only thing you need to change is the connection string of the DataSource object, to use production database as the default catalog.

Adrian Dumitrascu

Tuesday, March 20, 2012

Repeating subrecords n datasource

Hi all,
Can i place Different Reports having the "same" Subreports and Datasource
at the time of production.Means i don't want to deploy subreports n
datasources two times.
Is it possible?If so how can i ?
Ur suggestions will be appriciate
simmiYes. Use shared datasource, modify all RDL to reference the locations, and
deploy...
See help and rdl specifications for more details.
One approach to modifying the rdl and post it is to utilize .net framework
xsd.exe /c and the rdl xsd, deserialize, modify, serialize and createreport.
David Crawford [MSFT]
http://blogs.msdn.com/dc995
Disclaimer :
This posting is provided "AS IS" with no warranties and confers no rights.
"simmi" wrote:
> Hi all,
> Can i place Different Reports having the "same" Subreports and Datasource
> at the time of production.Means i don't want to deploy subreports n
> datasources two times.
> Is it possible?If so how can i ?
> Ur suggestions will be appriciate
> simmi

Wednesday, March 7, 2012

Rep service 2005 with 2000 db

Hi,
Does anyone know of what problems will I encounter If I run a dedicated SS
2005 instance with DBs replicated from a 2000 production server
Any URLs / books /advice is much apprciated
RegardsHi,
Does anyone know of what problems will I encounter If I run a dedicated SS
2005 instance and reporting services with DBs replicated from a 2000
production server
Any URLs / books /advice is much apprciated
Regards
"DB King" wrote:
> Hi,
> Does anyone know of what problems will I encounter If I run a dedicated SS
> 2005 instance with DBs replicated from a 2000 production server
> Any URLs / books /advice is much apprciated
> Regards

Monday, February 20, 2012

Rendering report when one dataset times out

We use Report Server reports to provide our support staff with views into several production databases on various servers. The most commonly used report is a summary of the data on several production servers. The report contains multiple datasets. Each dataset points at a different server. If one of the servers is down some reason, one dataset fails to execute, and the entire report fails to to render.

What I would like is some control over this behaviour. If a given data set fails to execute, I would like the report to continue and render the results. The failed data set would obviously show no data but this is fine by me.

I know I can place timeout values on each dataset. But this doesn't help me.

Can I structure my report or SQL in such a way that the report survives the failure of a dataset to execute because a remote server is down?

Thanks in advance for your help

Hi,

no actually not. YOu have to put the query within a stored procedure, catching it up with exception handling (Hope you are on SQL 2k5) or create a own data extension with .NET to provide a dataset to the report. In the custom coded data extension you will have all the functionalities of the .NET Framework to catch those errors.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||You may use link server to collect the data on others DataBase, And put them in Temp DB...