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

Database

 
GeneralOops, my bad Pin
David Mujica12-Nov-10 5:32
David Mujica12-Nov-10 5:32 
GeneralRe: Use a where clause Pin
logicon12-Nov-10 9:03
logicon12-Nov-10 9:03 
GeneralRe: Use a where clause Pin
PIEBALDconsult12-Nov-10 9:36
mvePIEBALDconsult12-Nov-10 9:36 
GeneralRe: Use a where clause Pin
Mycroft Holmes12-Nov-10 10:58
professionalMycroft Holmes12-Nov-10 10:58 
GeneralRe: Use a where clause Pin
PIEBALDconsult12-Nov-10 15:23
mvePIEBALDconsult12-Nov-10 15:23 
AnswerRe: Timeourt Pin
thatraja12-Nov-10 2:47
professionalthatraja12-Nov-10 2:47 
AnswerRe: Timeourt Pin
jschell16-Nov-10 9:03
jschell16-Nov-10 9:03 
QuestionCreate table from xml file Pin
Hum Dum11-Nov-10 22:07
Hum Dum11-Nov-10 22:07 
I have a xml file on which i have to operate.

I am using following approach
Declare @c_cmd VARCHAR(255),@C_940IN_FILE varchar(100),@C_940IN_DIR varchar(100)<br />
<br />
Set @C_940IN_FILE ='S_outbound.xml'<br />
Set @C_940IN_DIR ='\\xceed\tech\'<br />
<br />
 CREATE TABLE #TEMP_940    <br />
 (    <br />
  ROWDATA varchar(8000) Null    <br />
 )    <br />
   <br />
 SELECT @c_cmd='BULK INSERT #TEMP_940 FROM '+'''' + @C_940IN_DIR + '\' + @C_940IN_FILE + ''''    <br />
   + ' WITH (FIELDTERMINATOR = ''><'')'    <br />
 PRINT @c_cmd    <br />
 EXEC(@c_cmd)    <br />
-----------------------    <br />
 select * from #TEMP_940  <br />
<br />
Drop Table #TEMP_940


.
.

It gives me temp table with all nodes, like

   <Case_Dimension><br />
<br />
    <unit_of_measure>PK</unit_of_measure><br />
<br />
    <quantity>6</quantity><br />
<br />
    <unit_length/><br />
<br />
    <unit_width/><br />
<br />
    <unit_height/><br />
<br />
    <dimension_measure>CM</dimension_measure><br />
<br />
   </Case_Dimension>


Now i have to use a cursor for getting all the values of corresponding fields.


Is there any better way?
By which i get table which will create a temp table like, without using cursor

<br />
unit_of_measure     quantity ...  ....  .... so on<br />
---------------     --------<br />
______PK_______     ___6____ ...  ...  ....<br />


regards
AnswerRe: Create table from xml file Pin
Eddy Vluggen13-Nov-10 9:18
professionalEddy Vluggen13-Nov-10 9:18 
GeneralRe: Create table from xml file Pin
Hum Dum14-Nov-10 19:05
Hum Dum14-Nov-10 19:05 
GeneralRe: Create table from xml file Pin
Mycroft Holmes14-Nov-10 20:37
professionalMycroft Holmes14-Nov-10 20:37 
Questionin which version of sql i can get this performance tools & database tuning advisor Pin
vinu.111111-Nov-10 19:00
vinu.111111-Nov-10 19:00 
AnswerRe: in which version of sql i can get this performance tools & database tuning advisor Pin
thatraja11-Nov-10 19:27
professionalthatraja11-Nov-10 19:27 
GeneralRe: in which version of sql i can get this performance tools & database tuning advisor Pin
vinu.111111-Nov-10 19:31
vinu.111111-Nov-10 19:31 
QuestionMySQL-incorrect information in file frm Pin
PeriyasamyRamachandran9-Nov-10 23:24
PeriyasamyRamachandran9-Nov-10 23:24 
AnswerRe: MySQL-incorrect information in file frm Pin
Luc Pattyn10-Nov-10 7:21
sitebuilderLuc Pattyn10-Nov-10 7:21 
GeneralRe: MySQL-incorrect information in file frm Pin
PeriyasamyRamachandran10-Nov-10 17:12
PeriyasamyRamachandran10-Nov-10 17:12 
QuestionSQL where Clause help needed Pin
Member 44205349-Nov-10 23:11
Member 44205349-Nov-10 23:11 
AnswerRe: SQL where Clause help needed Pin
Blue_Boy9-Nov-10 23:31
Blue_Boy9-Nov-10 23:31 
AnswerRe: SQL where Clause help needed Pin
Scubapro10-Nov-10 1:07
Scubapro10-Nov-10 1:07 
AnswerRe: SQL where Clause help needed Pin
Chris Meech10-Nov-10 6:51
Chris Meech10-Nov-10 6:51 
QuestionBasic Question from a newbie Pin
JohnnyG9-Nov-10 14:49
JohnnyG9-Nov-10 14:49 
AnswerRe: Basic Question from a newbie PinPopular
Jörgen Andersson9-Nov-10 23:54
professionalJörgen Andersson9-Nov-10 23:54 
GeneralRe: Basic Question from a newbie Pin
PIEBALDconsult10-Nov-10 2:10
mvePIEBALDconsult10-Nov-10 2:10 
GeneralRe: Basic Question from a newbie Pin
JohnnyG10-Nov-10 2:36
JohnnyG10-Nov-10 2:36 

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.