Viewing 15 posts - 7,726 through 7,740 (of 8,731 total)
It's the way SQL Server (and other RDBMS) are designed. Every operation is written to logged before it's actually done. This way you can manage transactions that will be atomic.
Someone...
September 6, 2013 at 8:22 am
I agree with Sean, even if I don't know Erland, his reputation and answers in a short time in this site say a lot about him and his expertise and...
September 6, 2013 at 8:12 am
I have 2 ideas, one would be to change your scalar function into an inline table function that will perform much better.
CREATE FUNCTION [dbo].[AGE_GROUP](@string VARCHAR(20))
RETURNS TABLE
BEGIN
RETURN SELECT CASE
WHEN @string...
September 5, 2013 at 2:57 pm
I agree with Koen when he says that formatting should be done in the visualization layer.
But if the column type is money, then you can use CONVERT and a...
September 5, 2013 at 2:40 pm
Could you alias the column in your query to differentiate both decode columns?
September 5, 2013 at 2:36 pm
Something like this might help you. Unless it becomes more complicated
SELECT Text_Code,
LTRIM(PARSENAME( REPLACE( Text_Code, '~', '.'), 1)),
ISNULL(RTRIM(PARSENAME( REPLACE( Text_Code, '~', '.'), 2)), '')
FROM #A_Test
September 5, 2013 at 11:38 am
And why don't you create it? It's a very powerful tool.
September 4, 2013 at 8:15 pm
The first error message is giving you the solution to the problem.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the...
September 4, 2013 at 11:27 am
Without any more details on how the top 4 languages are defined or any sample data and expected results, this might give you a hint.
WITH Distinct_Data AS(
SELECT DISTINCT PD.ProviderId,
PD.FullName,
PL.LanguageDesc,
PR.RegionKey,
MD.OperationalMarket
FROM [dbo].[ProviderDim]...
September 4, 2013 at 11:07 am
Dennis Post (9/4/2013)
BTW, how can I alias the URLs?
If you do it manually, you can use the following syntax (without the space).
[ url=http://technet.microsoft.com/en-us/library/ms190356.aspx]SET Statements (Transact-SQL)[/url]
Otherwise, you can write the alias,...
September 4, 2013 at 10:14 am
John Mitchell-245523 (9/4/2013)
An integer can't be between two dates.John
Yes, it can be between 2 dates (sort of). The problem here is with data type precedence.
SQL Server can't compare between different...
September 4, 2013 at 9:41 am
OK, let's stop RBAR and get a set based solution that I'm pretty sure that will perform faster (you should test and not get my word for granted). I'm splitting...
September 4, 2013 at 9:22 am
It's good to know that you got what you needed. Be sure to understand what it does and be able to explain it to someone else (even if it's a...
September 4, 2013 at 9:06 am
Take a look at this.
A simple JOIN or EXISTS can do the trick.
/* Return ALL records from @productList that are LIKE products in @softwareReferenceList */
select p.*
from @productList p
JOIN @softwareReferenceList...
September 3, 2013 at 6:40 pm
As Ed said, this might be more complicated than this. However, this might give you an idea on what you need.
WITH CTE( String) AS(
SELECT '7MTWRF'
),
Tally AS(
SELECT TOP 100 ROW_NUMBER() OVER(...
September 3, 2013 at 1:07 pm
Viewing 15 posts - 7,726 through 7,740 (of 8,731 total)