Viewing 15 posts - 421 through 435 (of 1,082 total)
How about an Index on Cod_Batch and IND_ACTIVO with an includes for NUM_ORDEM?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 27, 2009 at 7:54 am
Hi there,
Please could you save the execution plan from SSMS and post it here as a file.
Also could you let us know the index definitions on this table and the...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 27, 2009 at 4:47 am
Jeff I hope you Proud changed you code a bit and and still using Setbased.
Pumps on my machine 7secs
SELECT TOP 1000000
CASE
WHEN ROW_NUMBER() OVER(ORDER BY GETDATE()) % 3 =...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 10:44 am
Ok assuming all your values are numeric then try this:
in the where clause
CHARINDEX('.',col1) > 6
OR
(CHARINDEX('.',col1) = 0 AND LEN(col1) > 5)
Here is my example for returning values that would...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 10:05 am
The only other thing I can think of it to return all rows that have a Len(Col) greater than what your decimal can hold and look at those
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 9:57 am
Also your select statement will normally return a number of rows before it actually falls over so you could use that as a point in the DB to start looking...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 9:53 am
Steve, cause it's an overflow I recon it's not that there is char
Also be careful because
This will return a 1 for ISNUMERIC but it's not convertible: '10,0'.
What I normally do...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 9:48 am
What is it that you would like us to do?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 23, 2009 at 5:26 am
is this what you looking for :
Select distinct d.Field1, Field2,
count (CASE
when Field3 = 1 and (DateField between...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 22, 2009 at 10:14 am
could you supply us with the query plan and or the actual query and any indexes you have on the tables in use.
This way we can see what is being...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 22, 2009 at 9:23 am
Here is another solution:
SELECT DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)
This one doesn't do any conversions it simply does Math 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 22, 2009 at 8:01 am
I'm with Jeff on this, why do you need to make the change?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 20, 2009 at 6:12 am
Thanks for the reply with the answer 🙂
Looks like the requirements changed a bit 🙁
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 15, 2009 at 2:16 am
Is this the sort of thing you looking for?
DECLARE @ptInsurancePlans TABLE
(
MRN INT,
CarrierID INT,
GroupID INT,
InsuranceLevel INT,
EffectiveDtTm DATETIME ,
ExpirationDtTm DATETIME
)
INSERT INTO @ptInsurancePlans
SELECT 1,1,1,1,'2008-01-01','2008-01-01' UNION ALL
SELECT 1,2,2,2,'2008-01-01','2008-01-01' UNION ALL
SELECT 1,1,1,1,'2008-01-01','2008-01-01'...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 14, 2009 at 10:04 am
Awesome example Gail...
I hope everyone reads this thread as it's a perfect example of teaching someone to fish rather than just feeding them...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
January 8, 2009 at 10:20 am
Viewing 15 posts - 421 through 435 (of 1,082 total)