Viewing 12 posts - 16 through 27 (of 27 total)
Maybe?
SELECT count(DISTINCT str(ReqID) + str(ClientID)) FROM employees
December 5, 2008 at 5:09 am
Look your execution plan. I think there is a difference. count(*) will probably use index something and index is probably corrupted.
February 17, 2008 at 11:17 pm
Strange behavior is caused by different database collation.
I run a test above using following collation: SQL_Slovenian_CP1250_CI_AS and "new-customer" record was missing.
It works fine using Latin1_General_CI_AS collation.
February 11, 2008 at 12:50 am
There is s crucial difference between selects:
first select
...
where order_name >= 'new' -- !! without "-"
second select
...
where order_name >= 'new-' -- !! with "-"
It works fine...
February 7, 2008 at 7:59 am
Here is script which removes default from column.
declare @sql varchar(8000)
declare @cTableName varchar(100)
declare @cColumnName varchar(100)
set @cColumnName = 'myCol'
set @cTableName = 'cisINI'
select @sql = 'alter table '...
December 17, 2007 at 4:56 am
I'm curious.
Does this
create table #tmp1(TmpintGroupID int)
insert into #tmp1 values(1815)
insert into #tmp1 values(1720)
insert into #tmp1 values(1409)
...
insert into #tmp1 values(1466)
SELECT count(*) as [TotalVolume], Sum(monCallCharge) as [TotalCost], Sum(intDuration) as [TotalDuration], Avg(monCallCharge) as [AvgCost],...
December 11, 2007 at 8:33 am
Below is the script which shows what you should do to drop a column like your's. And it's almost 100% complete. All that should be your concern.
create procedure dbo.SysDropColumnFromTable
@cTableName varchar(100),
@cColumnName...
December 10, 2007 at 8:02 am
Hi ,
I'm using sql server 2000. ...
Please, concentrate on posts.
November 19, 2007 at 4:46 am
Maybe something like this:
select (select count(*) from sysobjects c where c.id < a.id) + 1
from sysobjects a
order by id
lp, Matjaz
November 19, 2007 at 3:57 am
select *
into tmp
from test
where firstname = 'Daniel'
-- maybe drop foreign keys on table test
truncate table test
insert test
select *
from tmp
-- maybe create back foreign keys on table...
October 26, 2007 at 12:26 am
Example:
create view v_tb2_tb1
as
select t1.id, t1.name, t2.Salary
from Tb1 t1 INNER JOIN Tb2 t2 on
t1.id = t2.id
go
create trigger tiofu_vtb2tb1 on v_tb2_tb1 instead of update
as
set nocount on
update t2 set salary = i.salary
from...
October 17, 2007 at 11:25 pm
create a view and instead of update trigger on that view.
lp, Matjaž
October 17, 2007 at 2:47 am
Viewing 12 posts - 16 through 27 (of 27 total)