Viewing 15 posts - 376 through 390 (of 413 total)
Could you describe a bit more what you are trying to achieve?
July 21, 2005 at 4:52 am
You are welcome
If you still need help, please post the table definition.
July 21, 2005 at 4:47 am
Another possibility is to sort by a case statement, like the following:
order by case when id = 100 then -1 else id end
July 21, 2005 at 1:41 am
Try this one:
select distinct d.docid, d.name, s.date
from tblDocument d inner join tblstatus s on d.pk = s.objectid
where not exists
(select * from tblDocument d2 inner join tblstatus s2 on d2.pk =...
July 20, 2005 at 8:44 am
Could you post the table definition and also a list of indexes on your table?
What is "Previous A & E number" for the first visit, null or blank?
And (just curious)...
July 20, 2005 at 8:03 am
When I compare our suggestions, I see that you have renamed S1, S2 and S3 to Descr, Resol and Special, which of course is much better since it is more...
July 20, 2005 at 1:47 am
Looks like you are in for a headache
I would try something like
Select * from
SV00300
inner join SV00200
on SV00300.CUSTNMBR = SV00200.CUSTNMBR AND SV00300.ADRSCODE...
July 19, 2005 at 2:06 am
You could input @VarName1=@VarName2=@VarName3, or more elegantly, @VarName2=@VarName3=null and then
declare @OrderBy varchar(1000)
select @OrderBy = ''
if @VarName1 is not null
select @OrderBy = @VarName1 + ' ' + @SortOrder1
if @VarName2 is not...
July 19, 2005 at 1:41 am
Instead of the @SortBy parameter, I think I would add 6 parameters, @VarName1, @VarName2, @VarName3, @SortOrder1, @SortOrder2, @SortOrder3 and then add something like
'order by ' + @VarName1 + ' '...
July 18, 2005 at 9:08 am
You might have a point when you say that "trailing blanks are ignored", rather than "the shorter string is padded with blanks". The first statement is simpler as it involves only the...
July 18, 2005 at 8:59 am
I assume that ident is int identity(1,1) and that you want the largest number n such that the sum of the datalength of all rows with ident <= n is...
July 18, 2005 at 4:19 am
That's a good explanation, thank you
I would still prefer that '' and ' ' were different, but I guess there is not much...
July 18, 2005 at 12:32 am
I thought that maybe the performance difference had something to do with caching. Now I have executed each query 1000 times, and the "not exists" query is definitely faster -...
July 18, 2005 at 12:24 am
Oh, I skipped that one after reading the first two lines
I don't understand his answer (that the result is unknown). Since ''...
July 15, 2005 at 5:36 am
What happens if you again run query A and B in one batch, but this time query B before query A?
July 15, 2005 at 4:06 am
Viewing 15 posts - 376 through 390 (of 413 total)