Viewing 15 posts - 646 through 660 (of 859 total)
jerry209 (4/6/2012)
I am debugging a Stored Procedure and came across this SQL Statement.
The actual sql statement is some what like:
DECLARE @itemId INT
SET...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 4:09 pm
with out ddl and sample data for all the tables i cant be sure.
the first thing i would do is add a where clause to the query creating the CTE...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 4:06 pm
xenophilia (4/6/2012)
Please...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 3:31 pm
drew.allen (4/6/2012)
NM was a response to drew misreading the sql
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 3:15 pm
you need to add a where clause to your query. see this link to read up on them
http://msdn.microsoft.com/en-us/library/ms188047.aspx
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 3:14 pm
njdevils39 (4/6/2012)
LutzM (4/6/2012)
WITH cteRates AS
(
SELECT
o.EMP_ID,
(ROW_NUMBER() over(partition by o.EMP_ID order by x.r.value('@date_changed','DATETIME') desc)) as RowNum,
convert(VARCHAR(10), x.r.value('@date_changed','DATETIME'), 101) AS DATE_CHANGED,
...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 10:49 am
jewel.sacred (4/6/2012)
capn.hector (4/6/2012)
jewel.sacred (4/6/2012)
capn.hector (4/6/2012)
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 9:11 am
sharky (4/6/2012)
Thanks for the UPPER fix.
I have created the table using a clustered index with 50 rows
--
SELECT TOP 50 IDENTITY(INT,1,1) AS N
INTO dbo.Tally
FROM Master.dbo.SysColumns
ALTER TABLE dbo.Tally ...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 8:55 am
jewel.sacred (4/6/2012)
capn.hector (4/6/2012)
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 8:48 am
jewel.sacred (4/6/2012)
a trigger on sales would update quantity in hand (or part of your check out process)[/quote-0]This is the actual process in TSQL I am looking for 🙁
i would see...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 8:19 am
Lynn Pettis (4/6/2012)
jewel.sacred (4/6/2012)
capn.hector (4/6/2012)
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 8:15 am
ok first thing is i would move your conversion factor to your unit table, makes for easier changes with out haveing to make sure you update every conversion factor in...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 7:49 am
to limit the patients returned you can put your conditions in a where clause in the query (the self join giving your results) or if its a large table your...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 7:32 am
with cte as (select row_number() over (Partition by PATIENT_NUM order by REGISTER_DTIME asc) AS Row, * FROM #Tbl_PATIENT_ADM)
select a.PATIENT_NUM, a.ADT_SOURCE, a.PATIENT_NURSESTATION, a.REGISTER_DTIME, b.REGISTER_DTIME, DATEDIFF(Day,a.REGISTER_DTIME,b.REGISTER_DTIME)
from cte a
LEFT...
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 7:28 am
ok know how im attacking it. have to boot up my other machine to get every thing coded preaty and tested.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 6, 2012 at 7:11 am
Viewing 15 posts - 646 through 660 (of 859 total)