Viewing 8 posts - 1 through 8 (of 8 total)
Very good introduction. I am looking forward to learn basics and then advances options like creating chart, grahphs , automatic emails to user, scheduling etc... Can't wait for the next...
December 19, 2012 at 10:37 am
Hey Guys,
Below is the code that I changed for partition purpose. I know simple sql like select and group by etc.. but this is new to me and I really...
August 2, 2012 at 8:52 am
Sean Lange (8/1/2012)
select *
from CustomerConditions
where IsActive = 1
order by SortOrder
begin transaction
update CustomerConditions
set SortOrder = x.RowNum
from CustomerConditions c
cross apply
(
select ConditionID, ROW_NUMBER() over (order by isnull(SortOrder,...
August 2, 2012 at 6:42 am
capn.hector (8/1/2012)
August 1, 2012 at 3:22 pm
Lowell (8/1/2012)
i think it's simply like this:
...ORDER BY ISNULL(SortOrder,2)
yes it's simple if I have only one record to update but unfortunately I have thousands records like this 🙁
August 1, 2012 at 3:05 pm
kaushal_shah26 (8/1/2012)
I have a table like this
Id----------Type--------ConditionId-------isActive------SortOrder
1001-------860----------2----------------1------------1
1002-------860----------3----------------1------------0
1003-------860----------5----------------1------------Null
1004-------860----------1----------------0------------Null
1005-------860----------4----------------0------------Null
There are 3 conditions which are active. Out of those 3 conditions, 2 have sortorder value (1 and 0).
I need to write...
August 1, 2012 at 3:04 pm
Thanks for the quick response. Below is the script that I used to create table and insert sample data.
CREATE TABLE [dbo].[CustomerConditions](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Type] [int] NULL,
[ConditionId] [int] NULL,
[isActive] [bit]...
August 1, 2012 at 2:40 pm
I figured out the solution. Thanks for the help.
case when t.FinancialStatus = ''Customer'' then 0 else
case when (cfc.OriginalCostBase * ccc.mintransferpricepercentage /100) > (cfc.beforeactivationcostusd * ccc.mintransferpricepercentage /100) and
(cfc.OriginalCostBase *...
May 4, 2012 at 8:01 pm
Viewing 8 posts - 1 through 8 (of 8 total)