Viewing 15 posts - 5,806 through 5,820 (of 8,731 total)
Does increasing the length of your varchar to 19 solves the problem?
September 18, 2014 at 1:33 pm
I was expecting that compression would be one of the answers.
September 18, 2014 at 12:19 pm
Eirikur Eiriksson (9/18/2014)
Oops, used the wrong code:-P Here is the correct version, in fact the same thing Luis posted, but in SQLite dialect😎
I tested it on sqlfiddle.com and it worked...
September 18, 2014 at 12:11 pm
I'm sure there's a commandment missing.
STUDY. You'll never finish to learn. There's always something else that you must learn and that's why studying is so important. When we're not moving...
September 18, 2014 at 12:08 pm
Something like this?
SELECT 'Total' AS Dept,
SUM(CASE WHEN dept = 'A' THEN Total ELSE 0 END) AS A,
SUM(CASE WHEN dept = 'B' THEN Total ELSE 0 END) AS B,
...
September 18, 2014 at 11:52 am
Maybe something like this (you should read about sp_send_dbmail):
IF NOT EXISTS(
SELECT *
FROM RESTOREHISTORY
WHERE DESTINATION_DATABASE_NAME = 'intelligence'
...
September 18, 2014 at 11:20 am
ScottPletcher (9/18/2014)
@luis:I believe my code above met your (implied) challenge ;-).
Yes, I know. 😀
Thank you for sharing.
September 18, 2014 at 11:16 am
shahi.alokchandra (9/17/2014)
Actually i am having more then 100000 rows in table and if i use functions then my index might not be called.,that why want to avoid cases and functions.
Are...
September 18, 2014 at 10:08 am
Sean Lange (9/18/2014)
waseemshaikh345 (9/18/2014)
September 18, 2014 at 10:05 am
Stefan Krzywicki (9/17/2014)
September 17, 2014 at 2:18 pm
Do I see some personal/professional growth in these words? I really hope so.
This Post is closed. I will research the issue.
Thanks.
September 17, 2014 at 11:38 am
Do you need the space? You might need it in the future for DB growth so unless you really need it right now, you shouldn't try to release it. It...
September 17, 2014 at 10:06 am
vineet_dubey1975 (9/17/2014)
I glade and thanks to all members for giving solution and suggestion. This is working pretty nicely.Vineet D
Thank you for the feedback.
Now, something really important. Do you understand...
September 17, 2014 at 9:57 am
The simplest version I could think of.
declare @t table (Qty decimal(12,3),CF1 Decimal(12,3),CF2 Decimal(12,3),Flag TinyInt)
insert @t select 10,2,6,0
insert @t select 10,2,6,1
SELECT Qty* POWER(CF2/CF1, Flag)
FROM @t
EDIT: Unless someone proves me wrong, it...
September 17, 2014 at 9:48 am
You should read the discussion on this article. Of course, you must change the conditions a little bit for "C".
September 17, 2014 at 8:53 am
Viewing 15 posts - 5,806 through 5,820 (of 8,731 total)