Viewing 7 posts - 1 through 7 (of 7 total)
GOT IT! 😀
INSERT INTO XDW.dbo.tbl_Xclaimflag
([NTEXT]
,[Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[BeginEffectiveDate]
,[current]
) SELECT
[NTEXT]
,[Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[warehoused]
,1
FROM ( MERGE INTO XDW.dbo.tbl_Xclaimflag AS DST USING (
...
November 21, 2011 at 2:15 pm
for example, additional NTEXT field
INSERT INTO XDW.dbo.tbl_Xclaimflag
([NTEXT]
,[Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[BeginEffectiveDate]
,[current]
) SELECT
[NTEXT]
,[Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[warehoused]
,1
FROM ( MERGE INTO XDW.dbo.tbl_Xclaimflag AS DST USING (
...
November 21, 2011 at 12:22 pm
Hey another error...
In another table which I have to apply this logic on...
there exists an "ntext" field, it is throwing this error
Msg 306, Level 16, State 2, Line 61
The text,...
November 21, 2011 at 12:17 pm
Eureka! It works!
I inserted several bunk lines of data with all possible permutations of differences into SRC. It wrote any row with differences and excluded any row with duplicates into...
November 21, 2011 at 10:35 am
INSERT INTO XDW.dbo.tbl_Xclaimflag
([Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[BeginEffectiveDate]
,[current]
) SELECT
[Xclaimflag_id]
,[Xclaim_id]
,[Xclaimflagtype_id]
,[value]
,[warehoused]
,[warehoused]
,1
FROM ( MERGE INTO XDW.dbo.tbl_Xclaimflag AS DST USING (
...
November 21, 2011 at 9:25 am
SRC create
USE [X]
GO
/****** Object: Table [dbo].[tbl_Xclaimflag] Script Date: 11/21/2011 10:06:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tbl_Xclaimflag](
[Xclaimflag_id] [int] NULL,
[Xclaim_id] [int] NULL,
[Xclaimflagtype_id] [int] NULL,
[value] [nvarchar](32) NULL,
[warehoused] [datetime]...
November 21, 2011 at 9:15 am
One more bit of information, there are duplicate flagID's, with different warehoused dates. Where would I insert the where or having statement to pull the earliest warehoused date?
I think this...
November 21, 2011 at 8:46 am
Viewing 7 posts - 1 through 7 (of 7 total)