Viewing 15 posts - 7,816 through 7,830 (of 8,731 total)
Actually, if you read the discussion of the article, you can see performance comparisions for several methods. Your code should be faster than mine (which was recommended by the article)...
August 1, 2013 at 12:39 pm
You could find this article useful
http://www.sqlservercentral.com/articles/T-SQL/88244/
SELECT AttribID
FROM MyTable
WHERE FormatID IN (12,15)
GROUP BY AttribID
HAVING COUNT(DISTINCT FormatID ) = 2
EXCEPT
SELECT AttribID
...
August 1, 2013 at 11:30 am
Hi George,
You should really be trying to figure out this yourself by using BooksOnLine (BOL or SQL Server help) but I'll try to explain.
REVERSE will do exactly what it says,...
August 1, 2013 at 8:49 am
timwell (7/31/2013)
Also in the links to the Spanish documentation given above, I was able to replace "es-es" with "en-us" to get the article in US English....
I hadn't noticed that the...
July 31, 2013 at 10:06 am
I suppose that you mean using a graphic interface.
You can right click on the views folder and choose the option New View..., that will give you a designer.
For the permissions,...
July 31, 2013 at 9:42 am
Hi, you're asking for something that might be very simple but we need somee DDL and if possible some sample data to work with. Read the article linked on my...
July 31, 2013 at 8:45 am
Last week I came up with this option. I haven't made performace tests. Maybe you could help me with that.
DECLARE @test-2TABLE(
myintint)
INSERT INTO @test-2 VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9);
WITH CTE AS(
SELECT myint,
NTILE( 2) OVER( ORDER...
July 30, 2013 at 4:52 pm
Then it's a lot easier.
WITH CTE AS(
SELECT 'Jim k Smith' [FullName] UNION ALL
SELECT 'Robert K Lin' UNION ALL
SELECT 'Chris Tim'
)
SELECT LEFT( FullName, CHARINDEX( ' ', FullName)),
RIGHT( FullName, CHARINDEX( ' ',...
July 30, 2013 at 3:44 pm
We need more information to see what's happening. Please read the article linked in my signature to find out what we need.
July 30, 2013 at 3:31 pm
You need to create a view (reference) and then grant permissions only on that view (reference)
EDIT: Corrected language for the links.
July 30, 2013 at 3:30 pm
You need to realize that you might have names that can change the logic. The most common example would be spanish names (which can appear even in an English speaking...
July 30, 2013 at 3:26 pm
There's no need to have a variable for that, simply use a date calculation. 😉
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) - 1, 0)
July 30, 2013 at 12:31 pm
You mean this?
LEFT(Value,charindex('.',Value)-1)
July 30, 2013 at 10:18 am
There are some IFCode tags available to the left of your screen when you're replying. For SQL you need to use [ code="sql"][ /code] (without space).
July 30, 2013 at 10:11 am
Viewing 15 posts - 7,816 through 7,830 (of 8,731 total)