Viewing 15 posts - 8,551 through 8,565 (of 26,490 total)
PhilM99 (3/8/2013)
March 8, 2013 at 9:28 am
GilaMonster (3/8/2013)
opc.three (3/8/2013)
GilaMonster (3/3/2013)
They were added as separate columns to support a feature that was planned, partially added to SQL 2005 and later scrapped.
You know I am curious about these...
March 8, 2013 at 9:23 am
this:
if exists(select 1 from sys.tables where object_id = object_id('dbo.BigTable'))
drop table BigTable; --Drop SOURCE
if exists(select 1 from sys.tables where object_id = object_id('dbo.RefTable '))
drop...
March 8, 2013 at 7:25 am
Welcome to SSC. As it appears you are new here there are some things you need to do to helps help you and for you to get better answers...
March 8, 2013 at 7:15 am
Full Backup taken Monday night 6:00 PM.
T-Log backups taken every 2 hours starting at 8:00 PM until 6:00 PM Tuesday.
Full Backup taken at 6:00 PM Tuesday.
Full backups taken every 2...
March 7, 2013 at 11:45 pm
winmansoft (3/7/2013)
Lynn Pettis (3/6/2013)
Does this get you started?
with TopDates as (
select top (100)
MyDates
from
dbo.MyTable
order by
MyDates desc
)
select min(MyDates) from TopDates;
That...
March 7, 2013 at 11:17 pm
Me thinks we may have had an epiphany.
March 7, 2013 at 11:14 pm
alan_lynch (3/7/2013)
just me again I forgot to mention that yes I want to insert data that does not already exist in the Target Table but if it does exist...
March 7, 2013 at 9:26 pm
vinu512 (3/7/2013)
Brad Marsh (3/7/2013)
March 7, 2013 at 9:22 pm
Try this:
drop table BigTable --Drop SOURCE
drop table RefTable --Drop Lookup
--Create a Source table
CREATE TABLE BigTable
(
software_name_raw VARCHAR(255)
)
GO
--Insert records into Source table
INSERT INTO BigTable
VALUES
('Microsoft Office 2003'),
('Microsoft 2003 Office'),
('Microsoft Office 2003 Professional'),
('Sun Microsystems')
GO
--Create...
March 7, 2013 at 3:35 pm
observe:
declare @TestDate datetime;
select datediff(dd,getdate(),@TestDate)
select datediff(dd,@TestDate,getdate())
set @TestDate = '20130318';
select datediff(dd,getdate(),@TestDate)
select datediff(dd,@TestDate,getdate())
-----------
NULL
(1 row(s) affected)
-----------
NULL
(1 row(s) affected)
-----------
11
(1 row(s) affected)
-----------
-11
(1 row(s) affected)
March 7, 2013 at 3:25 pm
is250sp (3/7/2013)
Try to do this
--> Create temtp table
CREATE TABLE #Test(MonthOfYear int, Year int, Account int,Name varchar(255))
INSERT INTO #Test
VALUES(1,2013,1,'A')
INSERT INTO #Test
VALUES(12,2012,4,'B')
INSERT INTO #Test
VALUES(1,2013,4,'C')
INSERT INTO #Test
VALUES(1,2012,1,'D')
INSERT INTO #Test
VALUES(1,2013,5,'E')
--Build dynamic sql
DECLARE @Month int,...
March 7, 2013 at 3:03 pm
dhananjay.nagarkar (3/7/2013)
I would prefer datediff since that way not dependent of type of date format in DB hence need help please:-)
If the columns are defined as one of the date...
March 7, 2013 at 2:57 pm
If they are DATE or DATETIME data types why not just do this?
[WorkForce_WorkOrder].[Work Order End Date_WO] <= [WorkForce_WorkOrder].[Previous Work Order End Date_WO]
March 7, 2013 at 2:46 pm
Sean Lange (3/7/2013)
Lynn Pettis (3/7/2013)
Where is out here?
Kansas City area. I am actually in a town just to the West of the metropolitan area with a few miles of farms...
March 7, 2013 at 1:14 pm
Viewing 15 posts - 8,551 through 8,565 (of 26,490 total)