Viewing 15 posts - 13,306 through 13,320 (of 13,838 total)
Aah! So you are trying to detect series of consecutive numbers that do not contain gaps?
So you want output like this:
Min Max Count
107 112 6
?
September 15, 2005 at 5:54 am
So you want the min, max and count, subject to a filter on the data that is being analysed? Like this?
select count(field), min(field), max(field) from table where field between 107...
September 15, 2005 at 5:03 am
If you always know the first few letters, you could try left(column,2) = 'aa' instead of like 'aa%'. An index on the column that you are searching will also help...
September 15, 2005 at 4:59 am
I suggest that you use a reporting tool (Access, Crystal etc) to achieve this sort of formatting. What are you going to do with the output?
Regards
September 15, 2005 at 4:11 am
I agree - DTS is the way to go. Why make things harder for yourself??
September 15, 2005 at 4:09 am
Difficult to tell from the way that the stuff's been formatted for display. What is the field delimiter (ie which character appears between the fields and nowhere else)?
September 15, 2005 at 4:07 am
I've had a quick look, but can't find where this alias is appearing - please direct me to it!
Phil
September 15, 2005 at 4:04 am
Wow, comprehensive answer! So there is a God and he understands SQL Server ... all is well
September 15, 2005 at 3:28 am
What message are you getting?
September 14, 2005 at 5:22 am
Not in SQL Server - but perhaps it's something to do with Magic Software ???, check out:
September 14, 2005 at 5:20 am
This appears to be a logon error - possibly because the external app is trying to log in as sa and the sa password has been changed on the server. ...
September 14, 2005 at 2:38 am
This gets you some of the way and may give you an idea about how to finish it off:
select b1.*, sum(b2.units) CumUnits
from basetable b1
join basetable b2 on b1.tdate >= b2.tdate
group...
September 13, 2005 at 8:12 am
Why not recast this as a conditional insert?
if not exists (SELECT destination FROM filespath WHERE Destination = @a)
begin
INSERT INTO FilesPath (Path,Destination)
VALUES (@a,@b)
end
September 13, 2005 at 3:57 am
Hi Bob
Can you break the script into several stored procedures and then bring these all together in a master stored procedure? Just use
exec [procname]
within a stored proc to execute another...
September 13, 2005 at 2:36 am
I reckon people would be more keen to help if you posted a copy of pornstar.mdb
Under what circumstances does the error message appear?...
September 6, 2005 at 3:19 pm
Viewing 15 posts - 13,306 through 13,320 (of 13,838 total)