Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Single DTS Row to Multiple destination rows

Single DTS Row to Multiple destination rows

Scheduled Pinned Locked Moved Database
comquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    geekfromindia
    wrote on last edited by
    #1

    hi frnds, I need to transfer data from a single source column to multiple destination columns. Sample data:

    SOURCE TABLE:
    F1 F2 F3 <----header
    A 234 D11 D12 D13
    B 235 D21 D22 D23

    DESTINATION TABLE:
    col1 col2 col3 col4
    A 234 F1 D11
    A 234 F2 D12
    A 234 F3 D13
    B 235 F1 D21
    b 235 F2 D22
    B 235 F3 D23

    Is it possible through activex scripts?? If Yes, how??

    Keep DotNetting!! GeekFromIndia

    R 1 Reply Last reply
    0
    • G geekfromindia

      hi frnds, I need to transfer data from a single source column to multiple destination columns. Sample data:

      SOURCE TABLE:
      F1 F2 F3 <----header
      A 234 D11 D12 D13
      B 235 D21 D22 D23

      DESTINATION TABLE:
      col1 col2 col3 col4
      A 234 F1 D11
      A 234 F2 D12
      A 234 F3 D13
      B 235 F1 D21
      b 235 F2 D22
      B 235 F3 D23

      Is it possible through activex scripts?? If Yes, how??

      Keep DotNetting!! GeekFromIndia

      R Offline
      R Offline
      razov
      wrote on last edited by
      #2

      Hi, for each tuple in source table you have to create 3 instances in destination table, you can do this via stored procedure, by help of various methods of choice. take temp table with columns [SrNo numeric identity(1,1)] and four column of source table. transfer source table into temp table take max SrNo in a variable say count for each row of temp table from 0 to count BEGIN insert destination table([source col1],[source col2],F1,[source col3] insert destination table([source col1],[source col2],F2,[source col4] insert destination table([source col1],[source col2],F3,[source col5] END I think this way will transfer all your record from source table to destination table in desired manner. Bi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups