Hi!
I tried printing @sql1 and it does not help:
if exists (select [id] from master..sysobjects where [id] = OBJECT_ID ('master..temp_startime '))
DROP TABLE temp_startime
declare @sql nvarchar(4000)
declare @db varchar(300)
set @db = 'master'
declare cDB cursor for
SELECT name...
here is the code:
if exists (select [id] from master..sysobjects where [id] = OBJECT_ID ('master..temp_startime '))
DROP TABLE temp_startime
declare @sql nvarchar(4000)
declare @db varchar(300)
set @db = 'master'
declare cDB cursor for
SELECT name from master..sysdatabases sdb
WHERE...
George,
I already have found the problem. It was the one you pointed out AND
'(cast(Sum(ff.length) as decimal)/1048576) as ''[Original File Size (MB)]''' +
see the alias ff in length?
Tammy
hi!
I am having an error
Server: Msg 170, Level 15, State 1, Line 38
Line 38: Incorrect syntax near ' .dbo.filo_files b on a.[id] = b.ownerkey WHERE b.parentFileKey Is Null'.
I don't see what is wrong.
Maybe I cannot have a join in a string?
The code is below.
Thanks!
--1) We are...
Hi Borislav!
Sorry I meant to say there are selects within selects and they do not seem to work.
This is the error message I get:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'from'.
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword...
hi!
Im running the folowing code to loop through all the databases and
insert the results in a temp table.
In this case I need to run a join within a @sql string, but it does
not work.
Any ideas on how I can achieve this?
Here is my code:
if exists (select [id] from...
Hi!
I need to run my stored procedure on a monthly basis through all the
databases and spit out a report in Excel.
Here is my stored procedure for the report:
CREATE PROCEDURE usp_DR_Billing (@StartDate datetime,@EndDate
datetime,@PreviousDateEnd datetime)
AS
--insert all the...
I need to do a sumproduct in SQL Server
ALL_HOSPITALS table
days percentage days avoidable
1 0.244
2 0.127
30 0.890
The calculation would be
0.244*1+0.127*2+0.890*30
The total of the above has to be divided by the sum of days.
I am planning on having a temp table with the hosp name field and...
I need to do a sumproduct in SQL Server
ALL_HOSPITALS table
days percentage days avoidable
1 0.244
2 0.127
30 0.890
The calculation would be
0.244*1+0.127*2+0.890*30
The total of the above has to be divided by the sum...
Hi!
when I click on the application and then select which report I want to run. The report seems to open but then it shows a blank page and an error message saying ERROR 20997:????
In other machines the report works fine, in this particular machine it used to work fine but no it doesn't...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.