Viewing 15 posts - 76 through 90 (of 98 total)
What about
SELECT USERID, 'Monthly' as [PERIOD], SUM([MONTHLY] As [PERIOD_TOTAL]
UNION
SELECT USERID, 'Quaterly' as [PERIOD], SUM([Quaterly] As [PERIOD_TOTAL]
UNION
SELECT USERID, 'HealfYearly' as [PERIOD], SUM([HalfYearly] As [PERIOD_TOTAL]
UNION
SELECT USERID, 'Yearly' as [PERIOD], SUM([Yearly] As [PERIOD_TOTAL]
HTH,
B
November 5, 2012 at 5:14 am
Jeff Moden (11/2/2012)
bleroy (11/1/2012)
You could also use regular expressions - which would be much better and faster.
Oh, be careful, now. In T-SQL, that's not necessarly true. In fact,...
November 2, 2012 at 9:59 am
I think we will need more information.
The message obviously means it cannot find the server/instance; this may be for a great number of reasons, including:
The server name is incorrect, the...
November 2, 2012 at 4:27 am
You have two insert statements in your code - you can not "UNION ALL" two insert statements.
What you want (I think) is to insert into a new table a query...
November 2, 2012 at 3:53 am
Apologies - if you meant what Steve Jones wrote, then as he said, the WITH GRANT option is what you want:
If WITH GRANT is included in the (GRANT permission) statement,...
November 1, 2012 at 10:05 am
here is a good post to familiarise yourself with SQL Server security:
http://blog.sqlauthority.com/2012/04/23/sql-server-introduction-to-sql-server-security-a-primer/
SQL Server Security blog: http://blogs.msdn.com/b/sqlsecurity/
Grant statement from BOL: http://msdn.microsoft.com/en-us/library/ms187965.aspx (see links at bottom of article to see the related...
November 1, 2012 at 8:27 am
As indicated in a previous reply, the '?' may be the right answer - remember that the SSMS query results panel is not a text editor, and it may be...
November 1, 2012 at 8:18 am
sumith1andonly1 (11/1/2012)
tempdb related to the sql server performance?
Yes
November 1, 2012 at 4:59 am
Hi,
obviously, there is a problem with trying to input a big peg in a small hole - when I need to figure out which column is the offending one, I...
November 1, 2012 at 4:57 am
You could also separate the two tasks - first have the stored proc to update the data feeding the reports, and then add a different tasks (or have a job...
November 1, 2012 at 4:49 am
As mentioned earlier, being "indispensable" (e.g. because you are the only one who knows the system) is not a great strategy in the way that it also makes it nigh...
October 30, 2012 at 4:21 am
Thanks amillion guys - went for the code from Luis Cazares ... works like a charm as far as I can tell 🙂
B
September 11, 2012 at 8:03 am
Thanks a lot guys (haven't tested anything yet)! .. posted topic, went to get a coffee ... came back, refresh page --> 5 replies 🙂 ... I LOVE the SQL-family!...
September 11, 2012 at 7:49 am
Hi,
your code did ask to make it green if Prac_Rate is equal or greater than A_NatlRate (Where Prac_Rate >= A_NatlRate) so that was quite right.
The code using the CASE statement...
June 6, 2012 at 9:14 am
Viewing 15 posts - 76 through 90 (of 98 total)