Viewing 15 posts - 5,101 through 5,115 (of 8,731 total)
Here are my 2 options. Just wanted to note that I added an id to force order and that Jeff could be considered a false positive for a cleanup process.
CREATE...
March 24, 2015 at 3:35 pm
This is a quick idea.
WITH Letters AS(
SELECT TOP 26 CHAR(ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) + 64) letter
FROM sys.all_columns
)
SELECT DISTINCT n.*
FROM #Names...
March 24, 2015 at 3:20 pm
Alan's solution can be simplified by using the length of your column instead of calculations. You could also achieve it with the STUFF function (just for fun).
DECLARE @x TABLE (yourvalue...
March 24, 2015 at 9:59 am
Other than overriding any security configuration, as sysadmin can't be denied any permissions. Most permissions are assigned to different roles, just not at the same time. You could even grant...
March 23, 2015 at 5:54 pm
Assuming that you're using SSIS and your main problem is that your fifth/last column is including unwanted columns, I would suggest that you use a derived column to use only...
March 23, 2015 at 5:44 pm
You have to correct your join clause. Your HAVING clause has an issue as well.
SELECT parentName, count(*)
FROM parents p --Alias parent table
JOIN children c --Alias children table
...
March 23, 2015 at 11:23 am
I'd go with the ping option as a validation before inserting in the table.
Would this be a valid URL http://www.thisisaninvalidurl.com? It has the correct format but won't get you anywhere.
March 19, 2015 at 3:30 pm
As previously stated, you're getting a join on matched rows only. The problem is that your first row on table A matches both rows on table B and the second...
March 19, 2015 at 9:37 am
pietlinden (3/18/2015)
This is a...
March 18, 2015 at 4:49 pm
Or using replicate to know how many zeroes you're using without counting them. It's a matter of personal preference.
SELECT RIGHT(REPLICATE('0', 10) + RTRIM( YOUR_ACCOUNT_NUMBER), 10)
FROM (SELECT CAST( ABS(CHECKSUM(NEWID())) % 10000000...
March 18, 2015 at 4:40 pm
Don't thank me until you fully understand it.
There are lots of articles that talk about gaps and islands problems, some of them show better solutions performance wise but I like...
March 18, 2015 at 3:05 pm
Do you realize that this is a gaps and islands problem?
This is a possible approach using ROW_NUMBER(). Maybe someone can get a better solution as I don't like to sort...
March 18, 2015 at 2:25 pm
Another option, according to what I understood.
IF EXISTS(SELECT 1 FROM MyQuery)
INSERT INTO MyDestination( mycolumns)
SELECT mycolumns FROM MyQuery
The exists will stop at the...
March 18, 2015 at 10:23 am
This is what I thought, but I'm not sure if it helps because I still don't know the logic to differentiate one group from the other.
CREATE TABLE #Products
(
product...
March 17, 2015 at 4:03 pm
Can someone help with a crystal ball or interrogation system for this thread?
http://www.sqlservercentral.com/Forums/Topic1668185-391-1.aspx
March 17, 2015 at 1:06 pm
Viewing 15 posts - 5,101 through 5,115 (of 8,731 total)