Viewing 15 posts - 76 through 90 (of 166 total)
Here is my next level of try
select name,case when DataReceived IS not null then RecordsCount
else (select top 1 DATEADD(DAY, c.DaysInLate, md.MyDate) from #data d2 join #company c on d2.Name...
February 14, 2014 at 3:09 pm
Thank you Luis and Sean.
Here is my try
use tempdb;
set nocount on;
if OBJECT_ID('dbo.TallyTable') is not null drop table dbo.TallyTable
go
select top 100 IDENTITY(int,1,1) as ID
into dbo.TallyTable from master.dbo.syscolumns
alter table dbo.TallyTable add...
February 14, 2014 at 2:59 pm
if am not wrong that i need to create tally table?
February 14, 2014 at 2:42 pm
Hi Sean,
Thank you and if i execute the script i ma getting error as below. would like to anything wrong from my side
(3 row(s) affected)
(11 row(s) affected)
Msg 208, Level 16,...
February 14, 2014 at 2:37 pm
yes, all my output data can be text. any help please
February 14, 2014 at 2:08 pm
Please run this script to know the my desired output,
select 1000 as '2013-08-01', 1001 as '2013-08-02', 1002 as '2013-08-03', 1003 as '2013-08-04',1005 as '2013-08-05',1005 as '2013-08-06',
1006 as '2013-08-07',1007 as '2013-08-08',1004...
February 14, 2014 at 1:21 pm
Hi Sean,
Thanks for your time on this. please execute the below query and please take a look at column(2013-08-12) the value is null.
I need to join the table data with...
February 14, 2014 at 1:12 pm
Hi Sean,
Thanks for your reply.
If the value is null then get the column form the pivot which is date and get the "daysinlate" data from table compaany based on the...
February 14, 2014 at 12:07 pm
Hi Luis,
I understood the query well as you have explained very clearly. Even i added new condition to take care of null as well. I am all set now. thanks...
February 6, 2014 at 1:04 pm
Great. Last but not least, If i need to ignore 0 as well when taking average should i have to add one more case condition?
when MIN(PutchaseAmount) = 0 then AVG(NULLIF(PutchaseAmount...
February 5, 2014 at 9:59 am
Hi Luis,
Thanks a lot for your precious time on this post.
I prefer the second one because i should not consider the -1 when taking average. Where should i change the...
February 5, 2014 at 9:23 am
Hi Luis,
Thanks for your hints. I am thinking about how to make aggregate function not to consider the value -1. So i tried with casting as float. am i doing...
February 5, 2014 at 9:05 am
Hi lowel,
Even i am interested in going with linked server. But as my client needs other way i posted for suggestions. Thanks for your wonderful reply and i will start...
February 5, 2014 at 5:49 am
Hi Sean,
thanks for your reply. this is my client requirement. wondering is there any way to achieve without creating linked server.please suggest me
February 5, 2014 at 5:33 am
Viewing 15 posts - 76 through 90 (of 166 total)