Viewing 15 posts - 256 through 270 (of 608 total)
Sounds like a windows issue. Have you or can you try from another machine?
October 4, 2013 at 4:19 am
You will not get the results you want if the values are NULL.
When I compare tables I use a CHECKSUM.
SELECT
*
FROM
(SELECT
[compareHR].[dbo].[TableOLD].[Pos_no],
CHECKSUM(*) AS XSum
FROM
[compareHR].[dbo].[TableOLD]) AS Old
FULL JOIN
(SELECT
[compareHR].[dbo].[TableNEW].[Pos_no],
CHECKSUM(*) AS XSum
FROM
[compareHR].[dbo].[TableNEW]) AS New
WHERE
Old.Pos_no IS...
October 4, 2013 at 3:29 am
You could create a view that only has the columns you are interested in.
October 4, 2013 at 3:10 am
AndrewSQLDBA (10/3/2013)
Sorry, but I do not see any example using Dynamic SQL. I see the examples using straight Transact SQL.I NEVER, EVER use Dynamic SQL. No matter what.
Andrew SQLDBA
Dynamic SQL...
October 4, 2013 at 3:06 am
Dwain, that constraint won't allow you to disable editing.
UPDATE #usTab1
SET Col2 = 1
WHERE Col1 = 1;
GO
October 4, 2013 at 2:38 am
SELECT
CASE SUBSTRING(CAST(SERVERPROPERTY('ProductVersion') AS VARCHAR(50)), 1, 4)
WHEN '10.5' THEN '2008 R2'
WHEN '11.0' THEN '2012'
END AS 'SQL Server',
SERVERPROPERTY('ProductLevel') AS 'Level',
SERVERPROPERTY('Edition') AS 'Edition',
SERVERPROPERTY('ProductVersion') AS 'Version';
October 4, 2013 at 2:23 am
Can we see the actual execution plan?
October 4, 2013 at 2:22 am
CREATE TABLE JobTran
(JobNbr VARCHAR(10),
ClockIn DATETIME NOT NULL,
ClockOut DATETIME NULL);
INSERT INTO JobTran (JobNbr, ClockIn, ClockOut)
VALUES('Job1', '2013-10-03 06:17:34.387', NULL),
('Job1', '2013-10-03 05:17:34.387', '2013-10-03 08:10:34.387'),
('Job2', '2013-10-03 09:17:34.387', '2013-10-03 10:05:34.387'),
('Job2', '2013-10-03 09:17:34.387', NULL);
DECLARE @getdate-2 DATETIME...
October 3, 2013 at 7:30 am
create table A (col_1 varchar(1), col_2 int);
insert into A values('a',100);
create table B (col_1 varchar(1), col_2 int);
insert into B values('b',200);
create table C (col_1 varchar(1), col_2 int);
insert into C values('c',300);
-- Use a...
October 3, 2013 at 2:37 am
The behavior is the same with a stored proc
CREATE TABLE test (ID INT NOT NULL, Val INT);
GO
INSERT INTO test VALUES (1,1), (2,2), (3,3);
GO
CREATE PROCEDURE trg_test_upd
AS
UPDATE test SET val...
September 30, 2013 at 6:37 am
You need to use ROLLBACK inside the trigger.
CREATE TRIGGER trg_test_upd ON test AFTER UPDATE
AS
RAISERROR('Error', 16, 1);
ROLLBACK;
GO
September 30, 2013 at 6:35 am
kapil_kk (9/30/2013)
SrcName (9/30/2013)
can you put your code in more details?What are these T.labeltext , T.LabelKey, T.FileID.
error message is clear
SELECT 'UPDATE table_1 T
SET labeltext ='+ T.labeltext
'WHERE LanguageID = 10
AND...
September 30, 2013 at 4:10 am
BlackIceAngel (9/27/2013)
And no I'm not aware of the pitfalls of No Lock could you please elaborate?
September 27, 2013 at 5:17 am
You could try a CTE.
WITH CTE AS (
SELECT TOP 5
ID,
MID,
RName,
Pic1,
FoodType.Descr AS FoodType,
Average_P_PP,
lat,
lng,
(SELECT GEOGRAPHY::Point(Lat, Lng, 4326).STDistance(GEOGRAPHY::Point(- 1.33821478, 36.71208143, 4326))) AS Distance
FROM
Member
INNER JOIN
FoodType
ON (Member.FoodTypeID = FoodType.FoodTypeID)
WHERE
Zoom > 10
AND MAct = 'Full'
ORDER BY...
September 27, 2013 at 4:14 am
Viewing 15 posts - 256 through 270 (of 608 total)