Viewing 15 posts - 10,126 through 10,140 (of 26,489 total)
Luis Cazares (8/14/2012)
My suggestion is to move the condition from the WHERE clause...
August 14, 2012 at 10:11 am
mhambleton (8/14/2012)
I'm working a project where I need to be able to create a text file from a SQL Query. I use the BCP function but continue to get the...
August 14, 2012 at 10:04 am
Your WHERE clause forces the equivalent of an inner join. Move the @User = o.owneridname into your join criteria.
August 14, 2012 at 10:01 am
Brandie Tarvin (8/14/2012)
August 14, 2012 at 9:10 am
Brandie Tarvin (8/14/2012)
August 14, 2012 at 8:40 am
ChrisM@Work (8/14/2012)
SELECT
bi.Building_Name,
COUNT(di.DeviceNum) NumberOfDevices
FROM #Building_Information bi
INNER JOIN #Device_Information di
ON PARSENAME(bi.Subnet,4) = PARSENAME(di.IP_Address,4)
AND PARSENAME(bi.Subnet,3) = PARSENAME(di.IP_Address,3)
AND PARSENAME(bi.Subnet,2) = PARSENAME(di.IP_Address,2)
GROUP BY...
August 14, 2012 at 8:12 am
sotn (8/14/2012)
It is also called 'rowversion'
This field gets updated every time the row is modified, so...
August 14, 2012 at 6:41 am
Munabhai (8/13/2012)
August 13, 2012 at 4:35 pm
Do you mean something like this (based on test setup provided by rVadim):
CREATE TABLE #Building_Information (
Building_Name VARCHAR(50)
,Subnet VARCHAR(15)
);
INSERT INTO #Building_Information (Building_Name, Subnet)
VALUES ('Building 1', '192.168.1.%'),
...
August 13, 2012 at 4:11 pm
BudaCli (8/13/2012)
But nothing was added...Not complaining though
Yes there was, 0 (zero) seconds was added to the 0 (zero date, 1900-01-01 00:00:00.000).
August 13, 2012 at 3:51 pm
drew.allen (8/13/2012)
GSquared (8/13/2012)
CTEs don't start with a semicolon.
I disagree. While I'm sure that the intention is that the statement before must end with a semicolon, implementation and general practice...
August 13, 2012 at 3:35 pm
GSquared (8/13/2012)
Lynn Pettis (8/13/2012)
IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('schema.tablename') AND NAME...
August 13, 2012 at 2:43 pm
This is how I would code it. Also note that I am using sys.indexes, not sysindexes.
IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('schema.tablename') AND NAME ='indexname')
...
August 13, 2012 at 2:32 pm
My question is why do the IF EXISTS ... DROP followed by an IN NOT EXISTS ... CREATE? Why not just do the IF EXISTS ... DROP folloed immediately...
August 13, 2012 at 2:23 pm
I would say to create the index if it doesn't exist. Using the DROP EXISTING implies that the index already exists. We do it here to ensure that...
August 13, 2012 at 2:21 pm
Viewing 15 posts - 10,126 through 10,140 (of 26,489 total)