Viewing 15 posts - 271 through 285 (of 461 total)
Frank,
You are right. I've forgotten this behavior
I've corrected this:
update Mytable
set DateCol = Cast(DateCol-0.5 as int)
Bye
Gabor
December 30, 2003 at 2:33 am
And what about this:
update Mytable
set DateCol = Cast(DateCol as int)
The idea is the remove the fraction part (hh:mm:ss:nnn) and only keep the integer part (the days)
Bye
Gabor
December 30, 2003 at 2:06 am
I have would have an another approach.
For me in a small db of 80 MB a query of 30 sec or even minutes is inimaginable. Something must be wrong out...
December 30, 2003 at 1:35 am
You are absolutly right.
But you know here we are trying to show the way and the howtos to solve some specific problems.
Anyway you have brought a valid point, a transaction...
December 29, 2003 at 12:41 pm
Join is definitly your choice.
In your specifique example join is used the most efficiently.
The second example you've brought cannot work because you want to bring in a single column a...
December 29, 2003 at 8:32 am
If you really want to assure the uniqueness of your 12 columns beside your primary key I'm afrad the only way is a unique contraint (which is a unique index...
December 29, 2003 at 8:21 am
I agree to SeekQuel.
in a typical OLTP environment having 100% degradation of a query which normally performing at 10 ms and now at 20 ms is not noticeable by the...
December 29, 2003 at 8:17 am
If you really have only single row record retrievals (no range select, no sort)
then it doeasn't make too many sense to create a clustered index.
Non clustered index will remain faster...
December 29, 2003 at 8:10 am
declare @Column4 varchar(50), @Column5 varchar(50)
select @Column4 = Column4,
@Column5 = Column5
from MyTable
where id = 1
Update MyTable
set Column4 =...
December 29, 2003 at 7:55 am
Here is an another approach:
create table #temp(Id int, Name char(3))
create table #temp2 (Id int, Name varchar(50))
insert into #temp values(1, 'Abc')
insert into #temp values(1, 'xyz')
insert into #temp values(1, 'PQr')
insert into #temp...
December 29, 2003 at 5:17 am
It is not so easy.
You have to make a parser (like lex and yacc).
The basic idea is to search for the numbers and the operands.
Here is the beginning what you...
December 29, 2003 at 3:54 am
See BOL:
quote:
E. Use an OUTPUT cursor parameterOUTPUT cursor parameters are used to pass a cursor that is local to a...
December 29, 2003 at 3:30 am
I still belive that the convert is the most efficient way to remove the time part as it uses the less function calls
update Mytable
set DateCol = convert(datetime,...
December 29, 2003 at 3:25 am
If I've understood well you want to change the order of the columns in your index.
To do this first drop the index (alter table drop constraint...) and recreate it with...
December 29, 2003 at 3:15 am
Really it depends on your applications.
If your databases are not big, then it doesn't make sense give more RAM as your databases sizes are (+256 MB for Windows)
If you are...
December 29, 2003 at 3:04 am
Viewing 15 posts - 271 through 285 (of 461 total)