Wednesday, 22 May 2013
       
AUSQLUG Forums Home   Search   Login   Register   Member List  

  Viewing User Profile for: urid
 About  Contact
Joined: 18 Jun 2007 05:29 PM
Last Login: 12 Apr 2010 11:06 AM
Website:
Location: Unavailable to anonymous users.
Occupation: Unavailable to anonymous users.
Interests: Unavailable to anonymous users.
Signature: Best Regards,
Uri Dimant
SQL Server MVP
http://dimantdatabasesolutions.blogspot.com/
Email: Unavailable to anonymous users.
MSN IM: Unavailable to anonymous users.
AIM: Unavailable to anonymous users.
Yahoo IM: Unavailable to anonymous users.
ICQ: Unavailable to anonymous users.
 Post Statistics
urid has contributed to 34 out of 1,786 total posts (1.90% of total).
Most Recent Posts:
Re: SQL SUM 12/04/2010 11:08:26 AM   (Total replies: 0)
SELECT <columns>,SUM(COALESCE([col1],0)+COALESCE([col2],0)+COALESCE([col2],0)+COALESCE([col3],0)) OVER (PARTITION BY userid) AS Total FROM yourtbl

Re: SQL SUM 12/04/2010 11:08:28 AM   (Total replies: 0)
SELECT <columns>,SUM(COALESCE([col1],0)+COALESCE([col2],0)+COALESCE([col2],0)+COALESCE([col3],0)) OVER (PARTITION BY userid) AS Total FROM yourtbl

Re: SQL SUM 12/04/2010 11:08:29 AM   (Total replies: 0)
SELECT <columns>,SUM(COALESCE([col1],0)+COALESCE([col2],0)+COALESCE([col2],0)+COALESCE([col3],0)) OVER (PARTITION BY userid) AS Total FROM yourtbl

Re: Loop vs. UNION Performance 9/11/2009 6:18:18 AM   (Total replies: 0)
Hi Can you post sample data + an expected result to be tested? Aslo ,what version of SQL Server are you using?

Re: Single insert statement but multiple SPID causes multiple inserts 21/07/2009 12:46:50 AM   (Total replies: 1)
Hi I do not know PHP , but there is no magic... Do the tables have triggers?

Re: How to Update Statistics On Tables, which needs to be updated. 6/07/2009 2:54:17 PM   (Total replies: 0)
SELECT object_name(si.[object_id]) AS [TableName] , CASE WHEN si.[index_id] = 0 then 'Heap' WHEN si.[index_id] = 1 then 'CL' WHEN si.[index_id] BETWEEN 2 AND 250 THEN 'NC ' + RIGHT('00' + convert(varchar, si.[index_id]), 3) ELSE '' END AS [IndexType] , si.[name] AS [IndexName] , si.[index_id] AS [IndexID] , CASE WHEN si.[index_id] BETWEEN 1 AND 250 AND STATS_DATE (si.[object_id], si.[index_id]) < DATEADD(m, -1, getdate()) THEN '!! More than a ...

Re: Different versions of Application using same stored procedure 25/05/2009 3:26:55 PM   (Total replies: 0)
No, you do not. I would store the source of SP and all objects in Visual Source Safe to keep versioning.

Re: Converstion Issue from varchar to data int 26/04/2009 3:05:54 PM   (Total replies: 0)
You will have to change the WHERE condition to SELECT [test ID]) FROM Data42 where [test ID] = '36' as SQL Server converts it to the datatype with highest precedens http://blogs.msdn.com/craigfr/archive/2008/04/28/conversion-and-arithmetic-errors.aspx

Re: Trigger VS Stored Procedure 2/04/2009 10:19:18 PM   (Total replies: 0)
Hi dqw First of all I think you do not handle multi insert/update/delete withing a trigger, you can easily fix that. Something like that create trigger tru_MyTable on MyTable after update as if @@ROWCOUNT = 0 return insert MyAuditTable select i.ID, d.MyColumn, i.MyColumn from inserted i join deleted d on d.ID = o.Id go Regarding your question, you will have to grant ALTER permission on the table on which the trigger is defined. Also to disable ...

Re: how data/log files grow in 2000/2005 6/12/2007 7:40:34 PM   (Total replies: 1)
Hi What is the purpose to turn it off? Why not just set rup it to grow in MB instead of percentage? I have not tried your scenario, so it seems that it will grow up to specified size, however, do some testing and you'll see.

Search for more...