SQL help - Copy a record

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default SQL help - Copy a record

    Is it possible copy a record (with all its related records in other tables) with a single SQL statement?

    Please help.
    dubnet.co.uk Guest

  2. Similar Questions and Discussions

    1. Copy value from previous record?
      I have a field set up with the auto-enter option "copy value from previous record". Exactly _which_ record is "previous"... the help file doesn't...
    2. Copy a record to another table?
      Hello friends!! I have two forms each with its own subform. The first form consist of a main form with a subform for PARTS COSTS,(a...
    3. Copy and Paste Record
      I have a Customer form that I want to use to export name, address, etc.. into another form called TimeCards. Here is the code that I use to...
    4. cdrecord copy destroyed another windows copy !!!
      # cdrecord -msinfo dev=1,1,0 RAW/R16 0,221691 # cdrecord -msinfo dev=1,1,0 RAW/R16 44317,51858 what can be implied by those 2 messages ? How...
    5. cdrecord copy destroyed another windows NERO copy for re-writable media
      # cdrecord -msinfo dev=1,1,0 RAW/R16 0,221691 # cdrecord -msinfo dev=1,1,0 RAW/R16 44317,51858 what can be implied by those 2 messages ? How...
  3. #2

    Default Re: SQL help - Copy a record

    The answer was yes, until you added the part about the related records.
    Dan Bracuk Guest

  4. #3

    Default Re: SQL help - Copy a record

    I am not able to answer any questions in this CF forum as Ima Flash developer.

    I know there must be a SQL statemet similar to UPDATE which may make my quest complete!

    Your help is appreciated.
    dubnet.co.uk Guest

  5. #4

    Default Re: SQL help - Copy a record

    Originally posted by: dubnet.co.uk
    I am not able to answer any questions in this CF forum as Im a Flash developer.
    I know there must be a SQL statemet similar to UPDATE which may make my quest
    complete!
    Your help is appreciated.

    But there isn't. It brings up the question though, if you have the records
    available, why do you need to copy them?

    Dan Bracuk Guest

  6. #5

    Default Re: SQL help - Copy a record

    its because I am using this particular record as a blue print to instantiate
    other new records. The user can then use that as a starting point to modify its
    relationships accordingly.

    My SQL is not strong enough to query then create a new record with that query
    result so I thought there may be a cloning tag/function that may do this ie.
    look at a record and cascade down do its leaf node if you like and then dumb it
    put into a new record.

    or am i just going off into a dead end?

    dubnet.co.uk Guest

  7. #6

    Default Re: SQL help - Copy a record

    The user can use that as a starting point to modify it's relationships? You got an example in mind?
    Dan Bracuk Guest

  8. #7

    Default Re: SQL help - Copy a record

    there isnt anything special going on here, but I will try and give an example.
    In fact this is what Im trying to do:

    One CMS with one DB. The DB has a main table. Each record in this main table
    represents one website/intranet site that the CMS creates. Each record is also
    linked to other tables through relationships.

    An administrator builds a particular site which may be used for a particular
    learning function. This site structure, once built, can be used to serve other
    learning functions, if there is a way of 'cloning' the site (record) into
    another new record.

    I hope this makes sence...

    dubnet.co.uk Guest

  9. #8

    Default Re: SQL help - Copy a record

    Add another table that identifies a certain site record as a template:

    ID int autonumber (identity, whatever)
    Site_FK (the foreign key to the site table
    template_category varchar(1024)
    template_description varchar(max)

    Once you have this, you can use its records as a basis to reproduce the site.
    This function would not be a "simple SQL statement", but a full-blown stored
    procedure.

    Good luck.



    philh Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139