Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
well let me clarify a bit here. My hash is backwards, data file example is below. Database has columns for Date,Login,SearchLoad,etc, Date column is a date/time login real searchload real when I read file into hash I get timevalue->columnname, I want the reverse which would be columname->timevalue. In order to fix my data file, I want to add a label Date to the first value which is a timestamp for each record throughout the file, then I want to read the file into a hash so I can input it into the database which is currently empty and only contains the columns I want to use for the table. The sql for the table creation is in the bottom of this comment.
05/12/2006 12:21:10 AM,Login,19.748396,SearchLoad,13.459355,SearchCoun +t,64:0.660950,SearchResults,12.988677,SearchSave,6.138828,SearchDelet +e,1.682419,SearchDetails,10.114545,TaxLoad,3.995745,TaxResults,567:5. +287602,TaxDetails,3.975717,ClientAdd,2.643801,CMALoad,2.603744,CMASav +e,14.350635,CMADelete,1.021467,ClientDelete,0.731053,Logout,2.733931, +05/12/2006 12:54:07 AM,Login,18.015907,SearchLoad,13.259065,SearchCou +nt,64:0.620893,SearchResults,12.187526,SearchSave,5.327662,SearchDele +te,1.111600,SearchDetails,9.914256,TaxLoad,3.755399,TaxResults,567:5. +047257,TaxDetails,4.055832,ClientAdd,2.583715,CMALoad,2.834077,CMASav +e,14.350636,CMADelete,0.690993,ClientDelete,0.610879,Logout,2.743947, +05/12/2006 01:21:15 AM,
database stuff..
USE [performancetesting] GO /****** Object: Table [dbo].[AllResults] Script Date: 03/20/2009 1 +3:35:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[AllResults]( [Date] [datetime] NOT NULL, [Login] [real] NULL, [SearchLoad] [real] NULL, [SearchCount] [real] NULL, [SearchResults] [real] NULL, [SearchSave] [real] NULL, [SearchDelete] [real] NULL, [SearchDetails] [real] NULL, [ClientAdd] [real] NULL, [CMALoad] [real] NULL, [CMASave] [real] NULL, [CMADelete] [real] NULL, [ClientDelete] [real] NULL, [Logout] [real] NULL, [SiteCode] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NUL +L ) ON [PRIMARY]

In reply to Re^4: insert label into file by grashoper
in thread insert label into file by grashoper

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-05-28 03:46 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (98 votes). Check out past polls.