Viewing 15 posts - 271 through 285 (of 1,114 total)
Please post the table structre with sample data. Anyway i have created it for you.
create table price
(
p_id varchar(10),
qty int,
nou int
)
go
insert into price
select 'a001',1,2
union all
select 'a001',2,3
union all
select 'a001',3,5
union all
select 'a001',2,4
union all
select...
March 13, 2009 at 1:09 am
I have tested the same query in sybase 12.5.3 and oracle 10g.
SYBASE is sorting the result based on the expression.
ORACLE is not sorting the result based on the expression.
is the...
March 13, 2009 at 12:27 am
A little modification in Jeff's code.
SELECT DateName(mm,DATEADD(mm,MonthNumber,-1))
March 12, 2009 at 3:30 am
thomyes,
if you need help from here, post the table structure with sample data. I am sure you will get some good replies from this forum.
are you going to store...
March 12, 2009 at 3:20 am
Hi All,
A small modification in the requirement. Earlier we showed if user has selected 'Monday' then we will populate previous week's
Edited: date's
start date and end date . Now...
March 12, 2009 at 12:50 am
I am looking for some other workaround to do the same. So that i can get extend my knowledge.
March 12, 2009 at 12:46 am
I have tested the execution time of the query.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
SQL Server parse and compile time:...
March 12, 2009 at 12:44 am
Going little
I have written the below query to get the expected result.
Declare @MinDate datetime,@MaxDate datetime
select @MinDate = min(dt) from t_date
select @MaxDate = max(dt) from t_date
SELECT x.full_dt,t.dt,datename(dw,x.full_dt),case when Holiday_dt is null...
March 12, 2009 at 12:42 am
Meantime i have witten the below query to identify the missing date.
Declare @MinDate datetime,@MaxDate datetime
select @MinDate = min(dt) from t_date
select @MaxDate = max(dt) from t_date
SELECT x.full_dt,t.dt
FROM t_date t right...
March 12, 2009 at 12:26 am
Yes. It is interesting.
I have also tested the query plan.
#1 query ordering is done based on the expression.
#2 query ordering is done based on the column.
March 11, 2009 at 11:10 pm
Jeff Moden (3/11/2009)
Did that answer your questions, Karthik?
Yes. I got it.Thanks a lot.
So shall we order the string function based on their performance as below?
The order is like fastest,faster,fast,good,normal.
1) LEN()
2)...
March 11, 2009 at 10:54 pm
Jeff,
Yes.
Result on my box is here.
SQL Server Execution Times:
CPU time = 16967 ms, elapsed time = 0 ms.
==================== No Mod's (Baseline) ====================
SQL Server Execution Times:
...
March 11, 2009 at 10:47 pm
I have also tested the below query.
SELECT CONVERT(DATETIME,CONVERT(CHAR(8),DATE_TIME))
FROM TBL
Test1:
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
(110000 row(s) affected)
Table 'TBL'....
March 10, 2009 at 12:51 am
Viewing 15 posts - 271 through 285 (of 1,114 total)