Viewing 15 posts - 1 through 15 (of 15 total)
im glad it works for you!
regards.
July 6, 2009 at 10:23 pm
remove the extra quotes from the xml if there are some, replace for the scape code for xml, i dont remember the code, but, that should work. there are...
July 6, 2009 at 7:44 pm
also make sure the file is on the server, and it is not already open.
you can declare all the varchars as (max) not only the fields in the table.
regards
July 6, 2009 at 5:21 pm
in this case the XML path to get the products has changed,
'/solution/results/financialresults/serverfamilytotal/modelstotal/product'
replace the insert as follow:
INSERT INTO model([name],[val],[count],[rsid])
(select Tbl.C.value('@name', 'nvarchar(50)') as [name] ,
Tbl.C.value('@val', 'nvarchar(50)') as val, ...
July 6, 2009 at 5:18 pm
this is my code,just check the paths and table name, also using existing temp table could cause the problem i change it to table variable:
DECLARE @FileName varchar(255)
DECLARE @ExecCmd VARCHAR(255)
DECLARE @y...
July 6, 2009 at 4:43 pm
change the insert to this
INSERT INTO [SGA_DEMO].[dbo].[model]
([name]
,[val]
...
July 6, 2009 at 4:26 pm
it works for me, just make sure the path to the file is based on the Server files and folders not your local client computer. Another thing is that the...
July 6, 2009 at 4:14 pm
you are right
if you cant pass the content then you have to open it and pass as paramenter using another application, or you can try the example provided on
once...
July 6, 2009 at 3:30 pm
you have to pass the contents of the xml instear of the xml file itself use something like:
SET @FileName = 'c:\data\test.xml'
SET @ExecCmd = 'type ' + @FileName
set @strXML = EXEC...
July 6, 2009 at 1:22 pm
im had issues to post XML from iexplorer too, it worked when used chrome.
regards.
July 6, 2009 at 12:34 pm
if you have full control of the destination DB and it is only one, then move the SQL to a Stored procedure, if the destination tables are in multiple servers...
July 6, 2009 at 12:20 pm
just pass your xml as it is to a stored procedure that accepts a xml parameter like this:
CREATE procedure [dbo].[SP_GET_MODELS] (@strXML xml)
insert into MODEL
select Tbl.C.value('@name', 'nvarchar(50)') as [name] ,
...
July 6, 2009 at 11:57 am
im not so sure what you need , if you want to get all the values in a single query this is an example :
--you may need to change the...
July 6, 2009 at 11:14 am
what does those SQL variables content?
there are sometimes that you can split the ddl into multiple operations, maybe Adding columns one by one to a table, or converting long queries...
July 6, 2009 at 10:43 am
Use a code like this to pass multiple rows to a SP the insert them all in a single transaction:
Create procedure [dbo].[SGA_SP_EME_GET] (
@strXML xml
)
as
begin
declare @xmltablet TABLE(
pestana...
June 18, 2009 at 1:29 pm
Viewing 15 posts - 1 through 15 (of 15 total)