Viewing 15 posts - 76 through 90 (of 315 total)
Note that isnumeric is not always reliable
select isnumeric(','), isnumeric('12d6')
February 20, 2009 at 4:38 am
Double click the error
It will move the cursor to the specific line
February 20, 2009 at 4:32 am
milzs (2/18/2009)
I have two tables each with the...
February 19, 2009 at 1:25 am
something like
select col1,max(col2),max(col3)... from table
group by col1
February 19, 2009 at 1:23 am
Something like
select LoginOwner, min(LoginDateTime) as min_time, max(LogoutDateTime) as max_time
from table
group by LoginOwner,
dateadd(day,datediff(day,LoginDateTime,0),0),
dateadd(day,datediff(day,LogoutDateTime,0),0)
February 19, 2009 at 1:16 am
swmsan (2/18/2009)
I am using DateDiff function to find out the difference in number of days between 2 dates. [select Datediff(DD, '2009-02-10', getdate())]
I get same answer when I use 'D'...
February 19, 2009 at 1:06 am
EXEC sp_msforeachdb 'select * from ?..sysobjects where xtype=''tr'''
or
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/05/13/simulating-undocumented-procedures.aspx
February 19, 2009 at 1:02 am
Ninja's_RGR'us (1/15/2009)
SET @X = '278 * (1 / 4) - 2'
1 / 4 = 0 because both numbers are Ints.
if you use 1.0 instead of...
January 15, 2009 at 6:27 am
One of the methods is
declare @t table(ID int,Expression nvarchar(100))
insert into @t
select 1,'8*(1/2)-6' union all
select 2,'278*(1/4)-2' union all
select 3,'81*(3/5) +4'
declare...
January 15, 2009 at 6:25 am
Try this
select t1.col1, t2.col1 from
(your first query) as t1
cross join
(your second query) as t2
order by 1
January 2, 2009 at 3:15 am
For diffrent length
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/18/extract-only-numbers-from-a-string.aspx
December 31, 2008 at 1:30 am
Ashwin M N (12/30/2008)
December 30, 2008 at 6:55 am
Matin (12/30/2008)
Hi All,How to write dynamic query ?
Thanks
Make sure you read this fully
December 30, 2008 at 6:52 am
Lakhbir.Bhatti (12/30/2008)
ThanksLakh
You are welcome 🙂
December 30, 2008 at 6:51 am
RBarryYoung (12/30/2008)
Cute trick, Madhivanan. Of course "[GO]" and "EXEC GO" would also work, but I like this.
Thanks for the feedback 🙂
December 30, 2008 at 6:50 am
Viewing 15 posts - 76 through 90 (of 315 total)