Viewing 15 posts - 556 through 570 (of 5,356 total)
Next guess...![]()
set nocount on
use northwind
select
t1.CustomerID
, t1.OrderDate
from
orders t1
where
t1.OrderDate in
(
select top 2 --with ties
t2.OrderDate
from
orders t2
where
t2.CustomerID = t1.CustomerID
order by
t2.OrderDate desc
)
order by
t1.CustomerID
, t1.OrderDate desc
set nocount...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 1:42 am
Yes, when you're explicite in your conversion it works. The commented line fails because SQL Server is trying to bring 999999 down to a DECIMAL(2,0) which obviously won't work. This...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 1:11 am
I might be wrong, but I think this is an Indian measure. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 8:24 am
Yes, ddl_admin (or owner of the proc should be sufficient)
What happens when the user fires directly a DROP PROCEDURE statement?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 8:00 am
db_owner should be fine. What error do you get?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 7:54 am
I'll join the club here.
Since you have no control what is written to which log file, having multiple files will yield you nothing.
...except even more trouble in case...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 7:47 am
No, not yet ![]()
Btw, ...
Anyoen esle with a similar behaviour?
Already trying to pronounce "ASSUG" or "AUSSQLUG"?

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 5:52 am
ISNUMERIC behaves very funny at times. SQL Server MVP Steve Kass has posted the following in the public MS newsgroups. Enjoy!
SELECT
ISNUMERIC('$') AS Money_1
,ISNUMERIC('2d3') AS Float_1
, ISNUMERIC('$+,') AS Money_2
Money_1 Float_1 ...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 5:47 am
Yes, your
SELECT
CASE WHEN ScheduleTime1 > ScheduleTime2 THEN
CASE WHEN ScheduleTime1 > ScheduleTime3 THEN ScheduleTime1
ELSE ScheduleTime3
END
ELSE
CASE WHEN ScheduleTime2 > ScheduleTime3 THEN ScheduleTime2
ELSE ScheduleTime3
END
END
FROM ...
and the one I posted
SELECT CASE
WHEN...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 5:35 am
Amazing. Now I must find out what has changed in SP3a that caused this error
Thank you both!
![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 5:22 am
I also work in insurance business and the best thing you can do, is to properly design your schema right from the start. One single table should work just fine...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 4:41 am
I agree that the *best* advise here is to properly design your schema. However, if you are stuck with this design, what about one of these?
SET NOCOUNT ON
IF OBJECT_ID('max_t') >...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 4:14 am
Well, this is a good guess and usually correct, although not guaranteed to.
...but the OP wants to include a WHERE clause and rowcnt will not give you the information how...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 3:05 am
SQL Server bases its guesses on its internal statistical informations. I doubt that you can query them so that they suit your needs. I don't know of a way to...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 2:38 am
use tempdb
create table #test
(
c1 varchar(10)
)
insert into #test values('charcoal')
insert into #test values('c arco l')
select * from #test where c1 like '%[ ]arco[ ]%'
drop table #test
c1
----------
c arco l
(1 row(s) affected)
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 14, 2005 at 2:31 am
Viewing 15 posts - 556 through 570 (of 5,356 total)