Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009

    Unanswered: Creating rows of records from a STRING.


    I was greatly helped in my last question for that i am thankful. Again i am stuck at some thing which i am yet unable to even think of how to do it.

    We have a bcm ( auto dialer ) software at cisco and now making a .NET replica for windows. The dialer and respective software is done / created and in testing phase.

    Now at every call dialer generate a series of messeges starting from no1 to no34.

    The task i have is to take those events and populate a table from it.

    here for the start ( my own ) i am specifying one event.
    1 NewStateEvent { ChannelState:6; ChannelStateDesc:Up; CallerIdNum:7865269; DateRecieved:6:21:45 PM; Privilege:call,all; UniqueId:1303838416.2128; Channel:SIP/}

    Now what i am to log into a table is the name of even i.e 'NewStateEvent' , Channel state. i.e channel state:6 .. , Time . i.e DateReceived:6:21:45PM and UniqueId.

    As the developer of the bcm told me he will be giving me the data in form of

    A|b|c .

    so it simplify as every ';' will be replaced with '|' sign ... ( Incoming data) .

    the question is not how i will get the data ..

    question is : I have to make a Function of it .

    any help or any idea or the masters of this field please help me start or finish this work .. i will be greatful.


  2. #2
    Join Date
    Aug 2009
    Amazingly no one come up to assist ..

  3. #3
    Join Date
    Nov 2004
    Provided Answers: 4
    If you get the data in the form of a CSV-file (or you can convert the data into one), you can use the BCP utility. BCP doesn't works with streams.

    This is just one possibility, I'm not sure if this really is the best approach, but it let's you reuse an existing utility instead of reinventing/writing/debugging/maintaining your own wheel.
    With kind regards . . . . . SQL Server 2000/2005/2012

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  4. #4
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    This sounds like a task better suited to SSIS than to pure SQL. Where do you find this data (table, file, or other)? Please post a sample of five rows of data (include any important exceptions to the format). Where/how do you want the data stored when it reaches its final target?

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts