Merge Columns via ASP !!!

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Merge Columns via ASP !!!

    Is their a way using JET sql i can merge two columns in an Access DB via my
    asp script.
    Any insight or links to some good info would be appreciated!!!!


    Anthony Judd Guest

  2. Similar Questions and Discussions

    1. How do I merge Many PDF into One?
      I get multiple PDFs for various sources that I need to merge these documents into one so I may send it to a printer. Can someone please help me out....
    2. Photoshop 7 Merge Linked vs. Merge Down
      Hi, When I use the Merge linked to merge two layers together I get a different effect than when I merge down to the same layer. Why is that? Thank...
    3. Merge wont Merge Gradients?
      I don't know if this is new thing with CS or if it has always been this way. If I have 2 overlapping filled shapes, where the fills on each shape are...
    4. Columns and Inherited Datagrid...Active Schema does not support columns
      I have a class which has inherited from datagrid, to provide some custom functionality, row select, mouse overs etc All is working fine apart from...
    5. Pad strings/concatenate columns to simulate data columns in ASP select box with SQL Server 2K
      Dale, Cast all the data to fixed character data type in your select statement. For example: select cast(au_id as char(12)) +...
  3. #2

    Default Re: Merge Columns via ASP !!!

    On Wed, 16 Jul 2003 03:14:42 +1000, "Anthony Judd" <adsf@.com> wrote:
    >Is their a way using JET sql i can merge two columns in an Access DB via my
    >asp script.
    >Any insight or links to some good info would be appreciated!!!!
    Start with the first part -- Is there any way using JET SQL to merge
    two columns?

    Then you'll need to define "merge" in database terms. Do you want to
    only transfer the first field if the second is null? Which one wins
    if they are both non-null? Or do you want to concatenate the data, as
    in taking the FirstName and LastName column and making a Name column?
    Or do you just want to return both fields in a query, but leave the
    actual database alone?

    The basic answer is "Yes you can do it" but the real answer is you
    need to do more than just MERGE Column1, Column2 as a set of SQL
    statements. Once you have the SQL and data transformation rules
    figured out, the ASP is the easy part.

    Jeff
    ===================================
    Jeff Cochran (IIS MVP)
    [email]jcochran.nospam@naplesgov.com[/email] - Munged of Course

    I don't get much time to respond to direct email,
    so posts here will have a better chance of getting
    an answer. Besides, everyone benefits here.

    Suggested resources:
    [url]http://www.iisfaq.com/[/url]
    [url]http://www.iisanswers.com/[/url]
    [url]http://www.iistoolshed.com/[/url]
    [url]http://securityadmin.info/[/url]
    [url]http://www.aspfaq.com/[/url]
    [url]http://support.microsoft.com/[/url]
    ====================================
    Jeff Cochran Guest

  4. #3

    Default Re: Merge Columns via ASP !!!

    I want to concatenate the two database collumns..
    Any one have any suggestion about how to do this using jet sql..

    thanx !!!



    Anthony Judd Guest

  5. #4

    Default Re: Merge Columns via ASP !!!

    Anthony Judd wrote:
    > I want to concatenate the two database collumns..
    > Any one have any suggestion about how to do this using jet sql..
    >
    > thanx !!!
    What do you want to do? Create a new column in the table? Overwrite the data
    in one of the columns with the concatenated data? Return the result to the
    user without modifying the table?

    Concatenation is merely this:

    [column1] & [column2]

    HTH,
    Bob Barrows


    Bob Barrows Guest

  6. #5

    Default Re: Merge Columns via ASP !!!

    On Thu, 17 Jul 2003 19:48:18 +1000, "Anthony Judd" <adsf@.com> wrote:
    >I want to concatenate the two database collumns..
    >Any one have any suggestion about how to do this using jet sql..
    A permanent change? To a new column name, or one of the originals?

    Assuming two columns being combined into one permanently, it would be
    pretty dumb to do this in ASP anyway since it's a one shot deal. If
    you really must, then it would run something like this (Pseudocode):

    Create the new column

    Open the database
    Recordset = SELECT * from Table
    For each record in recordset
    NewField = Oldfield1 & Oldfield2
    UPDATE table with NewField
    Next

    Delete the two original columns

    Jeff
    Jeff Cochran Guest

  7. #6

    Default Re: Merge Columns via ASP !!!

    Jeff Cochran wrote:
    > Open the database
    > Recordset = SELECT * from Table
    > For each record in recordset
    > NewField = Oldfield1 & Oldfield2
    > UPDATE table with NewField
    > Next
    >
    > Delete the two original columns
    >
    Why use a recordset?

    Update table set newfield = oldfield1 & oldfield2

    Bob Barrows


    Bob Barrows Guest

  8. #7

    Default Re: Merge Columns via ASP !!!

    Thanx Bob...worked beautifully.


    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:edxOxYGTDHA.1556@TK2MSFTNGP10.phx.gbl...
    > Jeff Cochran wrote:
    > > Open the database
    > > Recordset = SELECT * from Table
    > > For each record in recordset
    > > NewField = Oldfield1 & Oldfield2
    > > UPDATE table with NewField
    > > Next
    > >
    > > Delete the two original columns
    > >
    > Why use a recordset?
    >
    > Update table set newfield = oldfield1 & oldfield2
    >
    > Bob Barrows
    >
    >

    Anthony Judd 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