Viewing 15 posts - 6,121 through 6,135 (of 7,608 total)
IF OBJECT_ID('tempdb.dbo.#row_counts') IS NOT NULL
DROP TABLE #row_counts
CREATE TABLE #row_counts (
db_name nvarchar(128) NOT NULL,
table_name nvarchar(128) NOT NULL,
...
April 21, 2014 at 2:49 pm
Maybe this:
case
when pwdLastSet0 is null then 'Never'
when pwdLastSet0 = '0' then 'Must change at next logon'
ELSE convert(varchar(10), cast (DATEADD(mi,(cast(pwdLastSet0 as bigint) / 600000000) - 157258080
+ DATEDIFF(Minute,GetUTCDate(),GetDate()),0) as varchar(32)), 101)...
April 21, 2014 at 2:41 pm
Change Tracking won't do what you've described. You would have to use CDC. Please note that CDC is only available on Enterprise Edition.
April 21, 2014 at 10:17 am
Sqlraider (4/21/2014)
ScottPletcher (4/18/2014)
SELECT
emp.eid, emp.agentid,
info.emailid,
mail.EmailAddr, mail.LName, mail.FName
...
April 21, 2014 at 9:50 am
Try this:
SELECT
emp.eid, emp.agentid,
info.emailid,
mail.EmailAddr, mail.LName, mail.FName
FROM employees...
April 18, 2014 at 3:28 pm
sql_variant would be a good data type for this.
April 18, 2014 at 3:19 pm
You don't want to modify the target table structure, as that will have lots of overhead.
Does the target table have a unique key column(s)? If not, can you add...
April 18, 2014 at 8:47 am
Jeff Moden (4/17/2014)
ScottPletcher (4/17/2014)
WHERE
column_name LIKE '[a-z]%'
That won't reject strings like '1.62073e+015'
It won't?? That string doesn't look like it starts with a letter to me ......
April 17, 2014 at 4:07 pm
DECLARE @parameter int
SET @parameter = 2 --NULL=ALL; spec. value = that value
SELECT
col1ID,
CASE WHEN COUNT(DISTINCT Col2ID) = 1 AND
...
April 17, 2014 at 2:16 pm
I think this query will give you what you need in separate rows. If so, let us know, and we can pivot it to a single row.
DECLARE @control_date datetime
SET...
April 17, 2014 at 2:02 pm
I suggest:
1) be sure to pad the month and day values so that the final format is a full yyyymmdd.
2) apply column names to make the code easier to understand...
April 17, 2014 at 1:47 pm
WHERE
column_name LIKE '[a-z]%'
April 17, 2014 at 1:38 pm
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
April 17, 2014 at 10:37 am
SpeedySQL (4/17/2014)
April 17, 2014 at 10:28 am
Lynn Pettis (4/17/2014)
ScottPletcher (4/17/2014)
April 17, 2014 at 10:19 am
Viewing 15 posts - 6,121 through 6,135 (of 7,608 total)