vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, How should we insert/update a (text data) column in a table? I have a table “Server” (Server Name, IP Address, System_Info). The “System_Info” column contains several rows of data. On the other side the “Server Name” & “IP Address’ column contain only one row. I was trying to insert/update the “System_Info” column via SQLLOADER but I didn’t get the desired results. Could some one suggest how should we insert or update the column like “System_Info” in a table, which contains several rows of data (Text data) with other columns? Thanks Wolfgang For Example: Server Name IP Address System_Info Test 127.0.0.1 OS Name: Microsoft Windows Version: 5.0.2195 Service Pack: Total Virtual Memory: 411944 |
| |||
| On 29 Apr 2004 11:07:15 -0700, wolfgang_nl@hotmail.com (W.Benvort) wrote: >Hi, > >How should we insert/update a (text data) column in a table? > >I have a table “Server” (Server Name, IP Address, >System_Info). > >The “System_Info” column contains several rows of data. On >the other side the >“Server Name” & “IP Address’ column contain >only one row. > >I was trying to insert/update the “System_Info” column via >SQLLOADER but I didn’t get the desired results. > >Could some one suggest how should we insert or update the column like >“System_Info” in a table, which contains several rows of >data (Text data) with other columns? > >Thanks > >Wolfgang > > > > >For Example: > > >Server Name IP Address System_Info > >Test 127.0.0.1 OS Name: Microsoft >Windows > Version: > 5.0.2195 > Service Pack: Total > Virtual Memory: >411944 What do you mean by "column contains several rows of data. "? Columns don't contain rows. Rows contain columns, not vice versa. By your example, I'd guess that you're expecting a row with server name, ip address, and a comment, followed by several other rows with more comments that relate to that server name and/or ip address. Further, your example seems to indicate that these additional rows will have neither the server name nor the ip address. If so, this will never work, as there is nothing to relate the additional rows to the first one. |
| |||
| W.Benvort wrote: > Hi, > > How should we insert/update a (text data) column in a table? > > I have a table “Server” (Server Name, IP Address, > System_Info). > > The “System_Info” column contains several rows of data. On > the other side the > “Server Name” & “IP Address’ column contain > only one row. > > I was trying to insert/update the “System_Info” column via > SQLLOADER but I didn’t get the desired results. > > Could some one suggest how should we insert or update the column like > “System_Info” in a table, which contains several rows of > data (Text data) with other columns? > > Thanks > > Wolfgang > > > > > For Example: > > > Server Name IP Address System_Info > > Test 127.0.0.1 OS Name: Microsoft > Windows > Version: > 5.0.2195 > Service Pack: Total > Virtual Memory: > 411944 Re-design your table, basically. For example, have a table just for IP Address. A separate table for Server Name, which can be linked to the one for IP Address. And a third for System Info, which will have IP as part of its primary key, and would therefore in your example contain 3 records for 127.0.0.1. To get the report out almost as you've displayed it here, you'd join all three tables together on IP Address. Or, if you don't fancy three tables to do the job, make the SYSTEM_INFO column a CLOB data type, and just insert multiple-lines of what amounts to free-form text. Or, if you want to get silly, create the SYSTEM_INFO column as a nested table or Varray. It all depends, really. Regards HJR |
| |||
| wolfgang_nl@hotmail.com (W.Benvort) wrote in message news:<9a0caaaf.0404291007.3bf67e30@posting.google. com>... > Hi, > > How should we insert/update a (text data) column in a table? > > I have a table “Server” (Server Name, IP Address, > System_Info). > > The “System_Info” column contains several rows of data. On > the other side the > “Server Name” & “IP Address’ column contain > only one row. > > I was trying to insert/update the “System_Info” column via > SQLLOADER but I didn’t get the desired results. > > Could some one suggest how should we insert or update the column like > “System_Info” in a table, which contains several rows of > data (Text data) with other columns? > > Thanks > > Wolfgang > > > > > For Example: > > > Server Name IP Address System_Info > > Test 127.0.0.1 OS Name: Microsoft > Windows > Version: > 5.0.2195 > Service Pack: Total > Virtual Memory: > 411944 1- What does the table describe look like? 2- What does the input sqlldr file look like? 3- And what did you control cards look like? I realize the above is an example of the data you are dealing with but you did not state it was taken from the input file or just a display of some of the information you are working with. If none of the MS Server text data exceeds 4000 bytes you can store it in a varchar2 column otherwise I think this is a job for a CLOB. HTH -- Mark D Powell -- |
| ||||
| Thanks Howards & Evevryone It is very nice to saw the suggestion form you. Could you send some sample about clob column as you discussed, if posible? REgards Wolfgang "Howard J. Rogers" <hjr@dizwell.com> wrote in message news:<4091745c$0$438$afc38c87@news.optusnet.com.au >... > W.Benvort wrote: > > > Hi, > > > > How should we insert/update a (text data) column in a table? > > > > I have a table “Server” (Server Name, IP Address, > > System_Info). > > > > The “System_Info” column contains several rows of data. On > > the other side the > > “Server Name” & “IP Address’ column contain > > only one row. > > > > I was trying to insert/update the “System_Info” column via > > SQLLOADER but I didn’t get the desired results. > > > > Could some one suggest how should we insert or update the column like > > “System_Info” in a table, which contains several rows of > > data (Text data) with other columns? > > > > Thanks > > > > Wolfgang > > > > > > > > > > For Example: > > > > > > Server Name IP Address System_Info > > > > Test 127.0.0.1 OS Name: Microsoft > > Windows > > Version: > > 5.0.2195 > > Service Pack: Total > > Virtual Memory: > > 411944 > > > Re-design your table, basically. > > For example, have a table just for IP Address. A separate table for > Server Name, which can be linked to the one for IP Address. And a third > for System Info, which will have IP as part of its primary key, and > would therefore in your example contain 3 records for 127.0.0.1. To get > the report out almost as you've displayed it here, you'd join all three > tables together on IP Address. > > Or, if you don't fancy three tables to do the job, make the SYSTEM_INFO > column a CLOB data type, and just insert multiple-lines of what amounts > to free-form text. > > Or, if you want to get silly, create the SYSTEM_INFO column as a nested > table or Varray. > > It all depends, really. > > Regards > HJR |