Viewing 15 posts - 166 through 180 (of 321 total)
Can you post your execution plan for your query
August 17, 2005 at 8:11 am
If you want to keep your design
you can write a function retrieveStatusName(StatusCode) wich returns StatusName
and use it in the select LIST.
Your performance will be affected by using a select...
August 17, 2005 at 7:16 am
one work arround can be
select case when task_attribs.string_value='XX'+replicate(' ',len(task_attribs.string_value)) then ''
else task_attribs.string_value end
group by task_attribs.string_value
August 16, 2005 at 8:10 am
Seems that the problem is caused by the CASE
statement.
August 16, 2005 at 8:01 am
yes
rtirm(task_attribs.string_value)!=task_attribs.string_value
you can replace task_attribs.string_value with
rtrim(task_attribs.string_value) in your select and will work
August 16, 2005 at 7:41 am
Because you are grouping by
GROUP BY ...
RTRIM(task_attribs.string_value),
not task_attribs.string_value that you use in your select clause
August 16, 2005 at 7:35 am
Format file for Bulk insert use option [ [ , ] FORMATFILE = 'format_file_path' ]
[ [ , ] FORMATFILE = 'format_file_path' ]
Test62.fmt:
-------------start----------------------
8.0
11
1 SQLCHAR 0 15 "" 1 name ...
August 16, 2005 at 7:19 am
declare @t table(ID int identity(1,1),Num1 int,Num2 int ,Num3 int,Num4 int, Num5 int)
declare @n1 int,@n2 int,@n3 int,@n4 int,@n5 int ,@mis int
select
@n1=21,
@n2=33,
@n3=34,
@n4=45,
@n5=46,
@mis=35
insert into @t
select 1,2,3,4,5 UNION ALL
select 1,5,7,9,15 UNION ALL
select 1,23,44,45,46...
August 12, 2005 at 7:39 am
declare @t table(CategoryID int,AddressID int ,ProductID int)
insert into @t
select 1,2,3 union all
select 1,2,4 union all
select 1,2,5 union all
select 2,2,4 union all
select 2,2,5 union all
select 1,3,7
select CategoryID,count(*) DistinctAddresses
from
(select
CategoryID, count(*)...
August 11, 2005 at 10:13 am
simpli because '01:45:00' is not an int
you can convert to a datetime but not int
you can get sum os seconds actully and you need to transform it back to...
August 11, 2005 at 10:00 am
Right my mistake : ) didn't check well enaugh just copy paste ...and ups there goes a LITTLE (actually big) mistake
Ya somehow the first plan force the optimizer to do the...
August 11, 2005 at 9:47 am
From the plan it seems that he wants to do an ahead optimization and sort the join it actually does the join. The second one retrieve the result from t1...
August 11, 2005 at 8:47 am
DECLARE @spcname varchar(50)
SET @spcname='Y'
SELECT b.antim_id,anitm_name
FROM
(SELECT a.spcid,a.missile_id,b.spcname
FROM Alien_CAPABILITY a INNER JOIN SPECIES b
ON a.spcid=b.spcid
WHERE spcname=@spcname) a
INNER JOIN DEFUSE_CAPABILITY b
ON a.missile_id=b.missile_id INNER JOIN ANTI_MISSILE c
ON b.antim_id=c.antim_id
GROUP BY...
July 29, 2005 at 7:47 am
Viewing 15 posts - 166 through 180 (of 321 total)