Click here to Skip to main content
15,892,674 members
Home / Discussions / Database
   

Database

 
AnswerRe: Temporary Table Pin
David Mujica20-Jul-09 5:54
David Mujica20-Jul-09 5:54 
GeneralRe: Temporary Table Pin
abcurl20-Jul-09 7:49
abcurl20-Jul-09 7:49 
GeneralRe: Temporary Table Pin
David Mujica20-Jul-09 8:19
David Mujica20-Jul-09 8:19 
GeneralRe: Temporary Table Pin
Ashfield20-Jul-09 20:58
Ashfield20-Jul-09 20:58 
GeneralRe: Temporary Table Pin
Robin_Roy21-Jul-09 18:08
Robin_Roy21-Jul-09 18:08 
QuestionHow to call VBA function on command event in access 2007? Pin
monika_vasvani20-Jul-09 3:34
monika_vasvani20-Jul-09 3:34 
AnswerRe: How to call VBA function on command event in access 2007? Pin
riced20-Jul-09 3:53
riced20-Jul-09 3:53 
QuestionImport XML to SQL Pin
Vimalsoft(Pty) Ltd20-Jul-09 1:57
professionalVimalsoft(Pty) Ltd20-Jul-09 1:57 
Good Day all

I have a Sp that is written like this
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go




ALTER PROCEDURE [dbo].[Import_RegistrationsXM] @xml ntext

AS

set nocount on

DECLARE @doc int
EXEC sp_xml_preparedocument @doc OUTPUT, @xml  

TRUNCATE TABLE _RegistrationXM
INSERT INTO _RegistrationXM
SELECT * 
FROM OPENXML ( @doc , 'Import/Item' , 2) 
WITH (	
	Student varchar(32),
	SubjectCode varchar(32),
	Campus varchar(32),
	Repeat bit
)
EXEC sp_xml_removedocument @doc

truncate table _Duplicates

exec( 'sp_RegistrationsXM_Populate' )

select 'XM Registrations successfully imported!' [Result]


i have an XML File that is 3.21mb, when i this Sp with the XML i get the Following Error
Exception caught in: ExecuteStoredProc: Cannot insert duplicate key row in object 'dbo._RegistrationXM' with unique index '_RegistrationXM_index'. The statement has been terminated. 


in the table _RegistrationXM there are no Records and in the File there are no Duplicates too.

Thank you

Vuyiswa Maseko,

Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: Import XML to SQL Pin
Ashfield20-Jul-09 2:19
Ashfield20-Jul-09 2:19 
GeneralRe: Import XML to SQL Pin
Vimalsoft(Pty) Ltd20-Jul-09 3:01
professionalVimalsoft(Pty) Ltd20-Jul-09 3:01 
GeneralRe: Import XML to SQL Pin
Ashfield20-Jul-09 4:44
Ashfield20-Jul-09 4:44 
GeneralRe: Import XML to SQL Pin
Vimalsoft(Pty) Ltd20-Jul-09 4:46
professionalVimalsoft(Pty) Ltd20-Jul-09 4:46 
GeneralRe: Import XML to SQL Pin
Ashfield20-Jul-09 4:52
Ashfield20-Jul-09 4:52 
GeneralRe: Import XML to SQL Pin
Vimalsoft(Pty) Ltd20-Jul-09 4:53
professionalVimalsoft(Pty) Ltd20-Jul-09 4:53 
QuestionData Migration- ORACLE and VB.NET Pin
cbe_pav20-Jul-09 0:43
cbe_pav20-Jul-09 0:43 
AnswerRe: Data Migration- ORACLE and VB.NET Pin
dan!sh 20-Jul-09 0:54
professional dan!sh 20-Jul-09 0:54 
Questionsql code problem Help pls Pin
TALHAKOSEN19-Jul-09 22:21
TALHAKOSEN19-Jul-09 22:21 
AnswerRe: sql code problem Help pls Pin
Blue_Boy19-Jul-09 22:29
Blue_Boy19-Jul-09 22:29 
GeneralRe: sql code problem Help pls Pin
TALHAKOSEN19-Jul-09 23:10
TALHAKOSEN19-Jul-09 23:10 
GeneralRe: sql code problem Help pls Pin
Blue_Boy19-Jul-09 23:13
Blue_Boy19-Jul-09 23:13 
QuestionGenerating dynamic where clause in stored procedure in sqlserver 2005 Pin
nainakarri19-Jul-09 20:34
nainakarri19-Jul-09 20:34 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Robin_Roy19-Jul-09 21:32
Robin_Roy19-Jul-09 21:32 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Blue_Boy19-Jul-09 21:59
Blue_Boy19-Jul-09 21:59 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
--CELKO--20-Jul-09 8:44
--CELKO--20-Jul-09 8:44 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
PIEBALDconsult20-Jul-09 10:44
mvePIEBALDconsult20-Jul-09 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.