Viewing 10 posts - 1 through 10 (of 10 total)
Is this requirement to show null column value to 'unknown' then I will suggest to check null value whenever you write select query on null columns and use IsNull(<col_Name>,'unknown')
If your...
November 26, 2012 at 11:21 pm
Is this requirement to show null column value to 'unknown' then I will suggest to check null value whenever you write select query on null columns and use IsNull(<col_Name>,'unknown')
If your...
November 26, 2012 at 11:19 pm
hi, You can write a query like
select Case When Month(getdate()) <=3 Then '31-03-'+ Convert(Varchar(4),Year(GetDate()))
When Month(getdate()) > 3 AND Month(getdate()) <=6 THEN '31-06-' + Convert(Varchar(4),Year(GetDate()))
When Month(getdate()) > 9 AND Month(getdate()) <=9...
November 19, 2012 at 12:04 am
great 🙂
I am happy with this answer.
Thankd stewartc-708166.
October 10, 2011 at 3:20 am
Thank you very much for your reply.
Yes, considering this example, it will work fine.
But what if I already have space in Col1.For that value too, it will show me 'Is...
October 10, 2011 at 1:31 am
I tried and got wrong in first select case 🙂
But wanted to know that
How can we chack null in this case then?
October 10, 2011 at 12:14 am
Hi Alok,
Updated this as per expected requirment
Case 1 ::
DECLARE @date DATETIME
set @date = '04/22/2011'
SELECT DATEADD(DAY,7-DATEPART(dw,@date) - 1,@date)
output :: 2011-04-22
But actually , it should be :2011-04-22(that is friday of...
April 27, 2011 at 6:42 am
Now, "executed from right to left"? WTF?
In the new example the top has been mentioned in INSERT statement so as per BOL, it will not get overwrite by SET...
April 25, 2011 at 10:59 pm
BOL is right, Ser rowcount overwrites the TOP function used in select statement. The statements will get executed from right to left so first Select statement will get executed and...
April 25, 2011 at 6:43 am
I guess the other user can not able to access Table A until second commit get executed.
April 25, 2011 at 6:36 am
Viewing 10 posts - 1 through 10 (of 10 total)