Viewing 15 posts - 12,181 through 12,195 (of 26,486 total)
You only show the create for the schema and a table, nothing for any of the procedures. Can't help you unless you show us everything.
May 8, 2012 at 12:56 am
We need the DDL (CREATE TABLE statement) for the tables involved in the query, including any indexes. Also the actual execution plan, saved and uploaded as a .sqlplan file.
Just...
May 8, 2012 at 12:38 am
kirkm 55368 (5/7/2012)
Where has has, e.g.
Select *
From Table1 t1
LEFT OUTER JOIN Table2 t2
ON t1.Col1 = t2.Col2
What are...
May 8, 2012 at 12:31 am
Use this for your third calculation:
SELECT Start_Date = DATEADD(dd, -1,DATEADD(mm,-3,DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0))),
End_Date = DATEADD(dd, -1,DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0))
May 7, 2012 at 4:17 pm
Using todays date (20120507) what would be the return values for each call to your function?
May 7, 2012 at 4:00 pm
ColdCoffee (5/7/2012)
I cant think of any way other than putting all those 50 columns in a WHERE clause.Lets wait for the heavyweights to throw their thoughts on this
Uh, intersect...
May 7, 2012 at 2:09 pm
select * from B
intersect
select * from A;
Normally would not use the * as I would prefer to explicitly name the columns.
May 7, 2012 at 1:59 pm
Sean Lange (5/7/2012)
May 7, 2012 at 11:05 am
The only suggestion I have for you at this time is to setup a server-side trace to see what is happening when this user that isn't firing the trigger does...
May 7, 2012 at 10:52 am
Here is one way. There are probably others that maybe faster and/or more effecient.
with TestData as (
SELECT 'W1' AS A, 'WWW' AS B, 'W2' AS C
UNION ALL
SELECT 'X1',...
May 7, 2012 at 7:21 am
Okay, can't answer your question as both queries work for me with no issues.
May 7, 2012 at 12:07 am
Smash125 (5/6/2012)
(
ContactID INT,
SalesOrderID INT,
OrderYear DATETIME
)
insert into Test(ContactID,SalesOrderID,OrderYear)
select top 10 ContactID,SalesOrderID,YEAR(OrderDate) as orderyear from AdventureWorks.Sales.SalesOrderHeader
order by ContactID asc
ContactID SalesOrderID,OrderYear
1441322001
1455792002
1463892002
1474542002
1483952002
1494952003
1507562003
2534592003
2589072003
2651572004
Delete fails when i try to delete using...
May 6, 2012 at 1:30 pm
sqlqtns (5/5/2012)
i had interview question that what you are checking in execution plan what is hampering and why it is query runnig slow?Thanx in advance.
Again, the intervierer is trying to...
May 6, 2012 at 1:03 am
sqlqtns (5/5/2012)
i got interview question like this;
if you have 5000 line stored procedure today i made and it works fine,but next day it works slow,how should i troubleshoot this...
May 6, 2012 at 1:01 am
Viewing 15 posts - 12,181 through 12,195 (of 26,486 total)