Viewing 15 posts - 736 through 750 (of 927 total)
now who said sql server does not have a heart 😛
thanks for sharing STEVE 🙂
February 14, 2014 at 12:23 am
your table structure is already showing running total column, i think you want to repeat the data until the new value come.
the date column is not a proper date,...
February 12, 2014 at 11:59 pm
very good question for the beginners to understand what OR , AND does.
Thanks for sharing ..
February 12, 2014 at 2:20 am
hoseam (2/12/2014)
DECLARE @Product_Id VARCHAR(50), @Fund_Id VARCHAR(50),
@NewFund_Id VARCHAR(50),@NewProduct_Id VARCHAR(50)
SET @Product_Id = 'PIC2'
SET @Fund_Id = ''
SET @NewProduct_Id = 'PCCV'
SET @NewFund_Id = ''
IF @NewFund_Id = ''...
February 12, 2014 at 1:03 am
you can assign 'null' to the parameter, so it will update the column with null
like this
Declare @param as varchar(20)
Declare @table1 table ( id int identity(1,1), name varchar(20))
insert into @table1...
February 11, 2014 at 11:49 pm
following is the solution for your as per the provided sample data.
Declare @table1 table (ID int,name varchar(10),[sep-12] varchar(10),[oct-12] varchar(10))
Declare @table2 table (ID int,Abc numeric(10,3), cde numeric(10,3),monthnbr int,yearnbr int)
insert into @table1
values
(1,'Abc',null,null),
(2,'cde',null,null)
insert...
February 11, 2014 at 11:26 pm
as per the design you will be adding 12 new columns in the table1 each year.
why you need a table1 in a first place, what exactly the problem you want...
February 11, 2014 at 4:52 am
very nice question ... but excellent third option ... Raining ... :hehe:
cheers !!!
February 11, 2014 at 4:48 am
did you tried to connect to the server from SSMS with the same credentials you have in connection string?
February 11, 2014 at 4:45 am
all you need is a PIVOT on the query, my question is what happened if you have 2013 year data for same months then what will be your result set...
February 11, 2014 at 4:42 am
are there to many joins you are using in your query (including these char columns). if yes then you can create a non clustered index on these two columns.
February 11, 2014 at 4:22 am
this link will help you in this regard
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 11, 2014 at 3:56 am
share the a proper sample data table for us to understand the problem to provide any help.
help us to help u 🙂
February 11, 2014 at 3:38 am
MAX() is working upon as per the definition of the base table.
in your query u are using left join, if you try to use right join u will be even...
February 11, 2014 at 1:26 am
Viewing 15 posts - 736 through 750 (of 927 total)