Viewing 15 posts - 16 through 30 (of 33 total)
I calculate wokringdays like this:
SELECT days/7*5 + days%7
- CASE WHEN 6 BETWEEN wd AND wd + days%7-1 THEN 1 ELSE 0 END
-...
October 6, 2009 at 4:48 am
I do not agree with the question.
With rollup and with cube where available, so even if implementation have changed, it is not new.
The question was about added features.
A revision of...
October 5, 2009 at 9:31 am
i think nchar(1) should be the correct answer.. nothing said it was limited to only 1byte characters!
Using special characters will not work with char(1)
September 23, 2009 at 8:51 am
In SQL 2008 Books online I find under @@DBTs:
Returns the value of the current timestamp data type for the current database. This timestamp is guaranteed to be unique in the...
September 23, 2009 at 2:28 am
without the it is rather obvious that the table would still be created but a warning will be given.
As long as you insert/update so combined they are...
July 29, 2009 at 7:45 am
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '<'.
So I think it's the last answer, query need some correction before compile!!!!!
July 29, 2009 at 7:33 am
Using where not exists will in most cases be faster then using a 'left join .. is null' to do an 'except'.
Example: let's say you need the ItemCode from Item...
July 22, 2009 at 7:31 am
Could you provide the table definitions and some sample data, now it's very hard to understand what you actually want.
It think if you would put your whole like structure in...
July 15, 2009 at 8:56 am
He want the see the rows with "memberaddress" when the param is member adress, but when it's not he wants to see all the other rows(even null)
litte example:
CREATE TABLE [dbo].[devTable](
[field1]...
July 10, 2009 at 8:39 am
select
AddressID,
Building=coalesce(Building,0),
Street,
City,
Zip,
...
July 10, 2009 at 8:31 am
Hi,
Sql determines how to apply the filter. He figures out it would be better the to the field1>1 because that would use an index on the column while Isnumeric(field1) will...
July 10, 2009 at 8:10 am
By using :
SELECT field1
FROM devTable
WHERE case when ISNUMERIC(field1) = 1 then field1 else 1 end > 1
The problem is dat sql while try fields1 > 1 because there is no...
July 10, 2009 at 7:50 am
create table dbo.tmpTestTable(a nvarchar(50),b nvarchar(10),c int,d float)
Insert into dbo.tmpTestTable select 'a1f','2a',3,4
Insert into dbo.tmpTestTable select 'a2ff','a1',3,4
Insert into dbo.tmpTestTable select 'a3fff','a2',1,4
Insert into dbo.tmpTestTable select 'a4fff','2a',3,1
Insert into dbo.tmpTestTable select 'a5fff','a2',3,4
select * from dbo.tmpTestTable
declare...
July 10, 2009 at 7:01 am
if object_id('dbo.tmpTable') is not null
drop table dbo.tmpTable
go
create table dbo.tmpTable(Slno int, ParentId int, Leg int, Orign char(1), Dest char(1))
insert into dbo.tmpTable
select 1, 1, 1, 'V', 'X'
union all select 2, 1, 2,...
July 3, 2009 at 7:14 am
Normally there should not be any difference in execution time and execution plan.
Be carefull to test with dbcc dropcleanbuffers and dbcc freeproccache, but don't do this on a production server.
Other...
July 3, 2009 at 6:41 am
Viewing 15 posts - 16 through 30 (of 33 total)