Viewing 15 posts - 3,916 through 3,930 (of 4,085 total)
teutales (8/16/2010)
Why do you want to not update an index during a batch?
because of duration... I thought this is a big brake...
thank you all for your replies!!!!
Your cursor is more...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 16, 2010 at 6:26 am
There are a couple of options.
CASE 1: Left outer join
SELECT DISTINCT e.EmpID, e.Name, CASE WHEN sub.EmpID Is NULL THEN 'N' ELSE 'Y' END AS Manager_Status
FROM Employee AS e
LEFT OUTER...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 15, 2010 at 4:39 pm
Your assignment statement is in the wrong place. Your statement should be
WITH CTE AS (....)
SELECT @MyVal = ( SELECT .... FROM CTE .... )
Also, the query you are using...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 15, 2010 at 4:12 pm
His function already returns the CustomerCode, so he can join on that instead of rewriting the function.
UPDATE TR
SET Amount_Lastest = FGA.AmountFinal
FROM #TempResults ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 13, 2010 at 2:02 pm
It's really not clear what you are trying to accomplish. Are you trying to replicate the Information_Schema.Columns view? How about providing sample data and expected results as recommended...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 12, 2010 at 7:41 pm
ziedkallel (8/12/2010)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 12, 2010 at 7:07 pm
Try CASTing it as varbinary(max).
You might also want to check that the collations on the two databases match. Different collations can treat the same character differently.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 12, 2010 at 10:26 am
The basic idea is that you check whether an object already exists. If it doesn't you add it.
IF NOT EXISTS (
SELECT *
...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 12, 2010 at 6:34 am
All you have to do is add/subtract the appropriate amount to adjust the beginning of your fiscal year to Jan. 1. In your case, subtracting three months (or adding...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 12, 2010 at 6:14 am
A couple of things. In order for us to help you with your problem, the sample data has to be representative of your live data. Since it's obvious...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 4:13 pm
Web browsers unescape the characters for you. In order to display the escaped characters, you have to escape the ampersands that are produced by your query.
col1(No column name)
1<A>, <B>,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 2:51 pm
I'll go one step further. Your OrderID and LineID should either be int (highly recommended) or at least padded with zeros to get a consistent length. Otherwise when...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 2:29 pm
It sounds like your original query was treating your XML data as string data. There are a number of ways that you can correct this, but since you didn't...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 11:45 am
You can also filter in your XPath expression. For example:
SELECT
b.header.value('Value[1]', 'varchar(20)') AS Typex2
FROM @bb.nodes('//ProcessTraceNode[contains(FunctionSymbol[1],"SUBFORMULA")]') AS b(header)
I'm not sure which is more efficient.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 9:33 am
If you group on the driver ID, you can find the Min() of the status. You can also use a PIVOT if the group by won't work for some...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 11, 2010 at 8:33 am
Viewing 15 posts - 3,916 through 3,930 (of 4,085 total)