Viewing 15 posts - 421 through 435 (of 506 total)
Please post DDL (create table) for tables or declaration of table variables and inserts with sample data.
June 12, 2017 at 11:40 am
Try:
SELECT Convert(varchar(10),Cast('20170609' AS date), 103) Char8AsUKdate
June 8, 2017 at 4:12 pm
Try:
SELECT DISTINCT ID, u.ValueX
FROM (SELECT ID
, MOD0
, MOD1
, MOD2
, MOD3
, MOD4
, MOD5
, MOD6
, MOD7
, MOD8
, MOD9
, MOD10
, MOD11
...
June 8, 2017 at 1:53 pm
This can be done using a stored procedure to update or create an update trigger.
June 8, 2017 at 12:09 pm
DECLARE @tbl table(ID int, Val int, ValType varchar(20));
INSERT @tbl (ID, Val, ValType)
VALUES (1, 23, 'Location')
, (2, 34, 'Location')
, (1, 44, 'Vehicles')
, (2, 34, 'Vehicles')
...
June 7, 2017 at 10:27 am
CREATE PROCEDURE My123 @int
AS
SELECT *
FROM My345
WHERE sExclude=
CASE WHEN @int<2 THEN @int
ELSE sExclude END;
GO
June 2, 2017 at 4:16 pm
Try:
DECLARE @test-2 table (ID int IDENTITY,CATEGORY VARCHAR(10));
INSERT @test-2 (CATEGORY)
VALUES ('5HW6')
,('256')
,('57')
,('3')
,('4578')
,('256HW');
SELECT ID
, CATEGORY
FROM @test-2;
SELECT ID
, n Position
, Substring(t.CATEGORY, n, 1) Letter
FROM...
June 1, 2017 at 2:33 pm
create a table to store these statistics and create a job to run it daily.
May 25, 2017 at 9:12 am
I prefer to use stored procedures for DML and handle encryption/decryption in the procedures.
May 24, 2017 at 2:23 pm
Oops, well sorry about that. You would have been able to see the null values had I selected form the left side as well as the right. Oh well.
A...
May 23, 2017 at 3:41 pm
If you can't create the constraint, there must be data that violates it as Gail said. (BTW Gail, nice B-5 quote from the Rangers)
select j.*
from...
May 23, 2017 at 1:24 pm
Viewing 15 posts - 421 through 435 (of 506 total)