Viewing 15 posts - 31 through 45 (of 314 total)
Can you post some sample data with expected result?
January 15, 2010 at 6:03 am
eslam.amgad (12/9/2009)
Thank you all for you repliesand thank you very very much Madhivanan, it worked for me and its done :kiss: 🙂
Thanks for your feedback and you are welcome 🙂
December 9, 2009 at 11:41 pm
purushotham.k9 (12/8/2009)
I need a help to select the last month like 2009-Nov.
Where do you want to use the result?
December 8, 2009 at 7:09 am
A quick way should be
SELECT date_col from your_table
where right(date_col,2)>31 or substring(date_col,5,2)>13
December 8, 2009 at 7:07 am
In SQL Server 2005, you should make use of row_number() function
Also see what you can do with it
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/multipurpose-row-number-function.aspx
December 8, 2009 at 7:02 am
Stop that query and try this
update
s
set sol_num=b.number
from
corpus.dbo.solution as s inner join corp.dbo.buckModifications as b
on b.arabic_vocalization = s.sol_arvoc and
b.stem = s.sol_stem and
b.lemmaid = s.sol_lemmaid
December 8, 2009 at 6:59 am
Have you tried using a stored procedure?
December 8, 2009 at 6:52 am
Note that isdate() is not fully reliable
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/09/24/handle-isdate-with-care.aspx
December 8, 2009 at 6:49 am
Also see how single quotes work in SQL Server
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx
December 8, 2009 at 6:46 am
Something like
select dateadd(month,datediff(month,0,date_col),0),
sum(case when date_col>=dateadd(month,datediff(month,0,date_col),0)
and date_col<dateadd(month,datediff(month,0,date_col),8) then 1 else 0 end) as first_week,
sum(case when date_col>=dateadd(month,datediff(month,0,date_col),8)
and date_col<dateadd(month,datediff(month,0,date_col),15) then 1 else 0 end) as second_week,
sum(case when date_col>=dateadd(month,datediff(month,0,date_col),15)
and date_col<dateadd(month,datediff(month,0,date_col),22) then...
December 4, 2009 at 7:16 am
Another way of doing this
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx
December 4, 2009 at 7:04 am
This is another method that uses OPENROWSET command which doesnot require CLR
December 2, 2009 at 1:49 am
I think it is better not to depend on a single character. So IMO better use set of junk characters as shown here
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/06/squeeze-function.aspx
November 16, 2009 at 7:59 am
Viewing 15 posts - 31 through 45 (of 314 total)