Viewing 15 posts - 331 through 345 (of 475 total)
Oracle765 (6/18/2013)
yes i agree, i am not sure about the left out join thats what has confused me a bit.
would this query provide the same results?
SELECT distinct a1.Netbios_Name0,
c1.SerialNumber0,...
June 18, 2013 at 6:37 pm
Another option for your trigger could be
CREATE TRIGGER [dbo].[R_CopyNewAuditID]
ON [dbo].[Audit]
AFTER INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets...
June 18, 2013 at 3:50 pm
Hi
I may be wrong, but I can't see a reason for this join
left outer join v_GS_CCM_RECENTLY_USED_APPS d1
on b1.ResourceID = d1.ResourceID
and b1.GroupID = d1.GroupID
June 18, 2013 at 2:00 pm
Hi
How do you want to deal with records that have the same marks?
For Example
SELECT *
FROM (VALUES
(99, 'Jim')
,(99, 'Joe')
,(97, 'Jock')
,(97, 'John')
,(96, 'Jack')
,(96, 'James')
,(96, 'Jeremy')
,(50, 'Jeb')
) m (Mark, Student)
Would you remove...
June 18, 2013 at 1:52 pm
Here's another option
with sampleData as (
SELECT FirstName, LastName, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) N
FROM (VALUES
('Robin','Bacon'),
('Owen','Twomey'),
('James','Kendall'),
('John','Cavanagh'),
('Lola','Oxborough'),
('Thomas','Archibald'),
('Mathias','Kearns'),
('Christine','Winger'),
('Barry','Kane'),
('Rereahu','Gray'),
('Douglas','Christian'),
('Jennifer','Clark'),
('Kenneth','Court'),
('Paul','Pedersen'),
('Bruce','McKelvie'),
('David','McCrary'),
('Paul','Allison'),
('Linda','Cawthorn'),
('Noelene','Schellhorn'),
('Patricia','Pedersen'),
('Ivan','Hill'),
('Stewart','Leys'),
('James','Austin'),
('Roger','McManaway'),
('Katherine','Edmonds'),
('Bryan','Wilson'),
('James','Jones'),
('William','Healey'),
('Caroline','Rae'),
('Stephen','Mullins'),
('Graeme','Gray'),
('Gary','Gibbens'),
('Annie','Oxborough'),
('Emma','Kennedy'),
('Patricia','Wii'),
('Raymond','Winger'),
('Judith','Owen'),
('Ruby','McCrary'),
('Peter','Waterhouse'),
('Gaye','Cox'),
('Barbara','Hill'),
('Jeanette','Patchett'),
('Norman','Forbes'),
('Andrew','Forsyth'),
('Aldyth','Edmonds'),
('Mick','Stohr'),
('Nicola','Howie'),
('Linda','Gray'),
('Fenella','Silva'),
('Allan','McCandless'),
('Gillian','Scott'),
('Garth','Woodcock'),
('Peter','Woodcock'),
('Fenella','Waterhouse'),
('Patricia','Leys'),
('Paul','Sykes'),
('Richard','Fortzer'),
('Dean','McKelvie'),
('Cuan','Fortzer'),
('Vaughan','Heymons'),
('Donald','Toseland'),
('Alan','Sclater'),
('Nancy','Ollerenshaw'),
('Eddie','Buhler'),
('Lewis','Taylor'),
('Kerin','Medland'),
('Carlton','Forsyth-King'),
('Opie','Cleland'),
('Gail','Oshannessy'),
('Stuart','Gray')
) AS N (FirstName, LastName)
)
,RandFirstName AS (SELECT FirstName, ROW_NUMBER() OVER (ORDER BY RAND(CAST(NEWID() AS VARBINARY)))...
June 4, 2013 at 8:47 pm
dwain.c (6/3/2013)
Now if I can just figure out how to export that so I can keep in sync the various SQL servers I operate on, I'd be happy as a...
June 3, 2013 at 7:14 pm
rossnruthie (5/30/2013)
Method 2(Micky) works well for the most part but will return a false positive where it finds a record with the am_sw flagged and less the 7 records following...
May 30, 2013 at 2:41 pm
Hi
You could try transferring the data over as a varbinary(max). You would need to specify a query where you cast the Geography column as a varbinary(max) rather than...
May 30, 2013 at 2:14 pm
rossnruthie (5/30/2013)
May 30, 2013 at 1:57 pm
And another possible method:-)
select i.number
from @numbers i
where am_sw = 1
and not exists (
SELECT 1 cc_sw_sum
FROM @numbers ca
WHERE i.number = ca.number
and ca.sequence_number - i.sequence_number...
May 29, 2013 at 4:05 pm
Hi
As Grant said the Geography (and Geometry) datatypes are design to store and manipulate sets of coordinates. They can't be used to store an ordinate.
I guess the question is...
May 29, 2013 at 1:45 pm
Hi
You might be able to create a function to handle it, eg:
CREATE FUNCTION dbo.myOpCarYear (@op varchar(2), @value varchar(4)) RETURNS TABLE AS
RETURN
(SELECT CARS.Year FROM CARS WHERE @op = '<>'...
May 28, 2013 at 5:00 pm
Hi
You could try the following, I wouldn't expect the performance to be the best because of the partition on the RIGHT function. It may be worthwhile making the making...
May 26, 2013 at 2:38 pm
You're welcome
May 22, 2013 at 1:58 pm
Sean Pearce (5/21/2013)
If the columns are nullable then you can concatenate.
...
SELECT
ISNULL(House_No_Start, '') + ISNULL(' - ' + House_No_End, '') + ISNULL(House_Name, '') AS House
FROM
House;
...
I frequently use (and prefer) the method...
May 21, 2013 at 1:29 pm
Viewing 15 posts - 331 through 345 (of 475 total)