how to separate the data

  • Ok i got a csv in permon and i brought into SQL Table

    SELECT [(PDH-CSV 4#0) (Pacific Daylight Time)(420)] as datetime,

    [\\Servername\PhysicalDisk(7 T:)\Disk Reads/sec] ,

    [\\Servername\PhysicalDisk(7 T:)\Disk Writes/sec] ,

    [\\Servername\PhysicalDisk(9 L:)\Disk Reads/sec] ,

    [\\Servername\PhysicalDisk(9 L:)\Disk Writes/sec] ,

    FROM PHYSICAL_DISK

    Now when it is Type T I want to read another table and get the values

    DRIVEDESCRIPTIONDISKSAPPROX_IOPSRAIDSPEED

    TTemp DB 2160 5 15.00

    So that i can do this calcuation (READS + (4 * WRITES) / NUMBER OF DISKS)

    but i cannot join above as this is column value and not Drive.

    Any ideas? I hate to have to put in two tables just because.

  • Have you considered using the CHARINDEX function: For example:

    SELECT CHARINDEX('T:','[\\Servername\PhysicalDisk(7 T:)\Disk Reads/sec]' which will return the value 30.

    and

    SELECT CHARINDEX('T:','[\\Servername\PhysicalDisk(7 L:)\Disk Reads/sec]') returns a value of 0.

    Based on the above use either and IF or CASE to invoke what other processing you require.

    I am relatively confident that you would get a more satisfactory answer had you posted following the guidlines in my signature block.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • The column name is [\PhysicalDisk(1 T:)\Disk Reads/sec] not the data value.

    The data itself will be 7 or 45 etc

    So that didn't work.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply