Viewing 15 posts - 4,531 through 4,545 (of 8,753 total)
SQLPain (9/14/2015)
September 14, 2015 at 11:03 pm
john_rowles (9/14/2015)
September 14, 2015 at 10:53 pm
Sorry, slightly hurried and inaccurate
😎
CONVERT(DATE,AppDetails.DateDetailDisposed,0) = CONVERT(DATE,DATEADD(DAY,-21,getdate()),0)
September 14, 2015 at 3:56 pm
kdejan87 (9/14/2015)
CREATE TABLE #NONAMETABLE(
ID INT
,column1 INT
,column2 int
);
INSERT INTO #NONAMETABLE(ID,column1,column2) VALUES
(1,100.00,40)
;
drop table...
September 14, 2015 at 3:49 pm
SQLPain (9/14/2015)
why do we need a between clause if I only need records...
September 14, 2015 at 3:40 pm
Just remove the arbitrary opening parenthesis
😎
CREATE VIEW abcd AS
SELECT
a.description,
a.corporate_tag,
a.corporate ,
a.banner_tag,
a.banner,
a.region_tag,
a.region,
a.division_tag,
a.division,
a.hierarchy_level,
a.load_id,
a.process_name,
a.loop_id,
( case WHEN b.corporate_tag IS NULL or b.banner_tag IS NULL THEN 'I' Else 'U' END )
/* or ( case...
September 14, 2015 at 3:25 pm
SQLPain (9/14/2015)
Thanks Errikur,I only want results from past 21 days, I tried this also:
AppDetails.DateDetailDisposed = DATEADD(DAY,-21,getdate())
Still gives me a blank result set
Missed the 21 days:-P
😎
AppDetails.DateDetailDisposed BETWEEN CONVERT(DATE,DATEADD(DAY,-25,getdate()),0) AND CONVERT(DATE,getdate(),0)
Note, convert...
September 14, 2015 at 3:17 pm
Slightly different approach from JLS's
😎
USE tempdb;
GO
SET NOCOUNT ON;
GO
DECLARE @SAMPLE_DATA TABLE
(
column1 NUMERIC(12,2) NOT NULL
,column2 NUMERIC(12,2) NOT NULL
);
INSERT INTO @SAMPLE_DATA(column1,column2)
VALUES ...
September 14, 2015 at 3:12 pm
SQLPain (9/14/2015)
Thanks Scott,How do I fix this code:
AppDetails.DateDetailDisposed BETWEEN getdate() - 25 AND getdate() - 20
I only need getdate() -21, but that's giving me blank output
Use DATEADD
😎
AppDetails.DateDetailDisposed BETWEEN DATEADD(DAY,-25,getdate())...
September 14, 2015 at 2:59 pm
pietlinden (9/14/2015)
September 14, 2015 at 2:33 pm
pietlinden (9/14/2015)
I just find...
September 14, 2015 at 1:50 pm
Wayne West (9/14/2015)
Matt Miller (#4) (9/14/2015)
Eirikur Eiriksson (9/14/2015)
Jeff Moden (9/14/2015)
Eirikur Eiriksson (9/13/2015)
September 14, 2015 at 1:44 pm
nightowl23 (9/14/2015)
September 14, 2015 at 1:09 pm
Viewing 15 posts - 4,531 through 4,545 (of 8,753 total)