Ask a Question related to ASP Database, Design and Development.
-
Anthony Judd #1
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
-
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.... -
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... -
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... -
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... -
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)) +... -
Jeff Cochran #2
Re: Merge Columns via ASP !!!
On Wed, 16 Jul 2003 03:14:42 +1000, "Anthony Judd" <adsf@.com> wrote:
Start with the first part -- Is there any way using JET SQL to merge>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!!!!
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
-
Anthony Judd #3
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
-
Bob Barrows #4
Re: Merge Columns via ASP !!!
Anthony Judd wrote:
What do you want to do? Create a new column in the table? Overwrite the data> I want to concatenate the two database collumns..
> Any one have any suggestion about how to do this using jet sql..
>
> thanx !!!
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
-
Jeff Cochran #5
Re: Merge Columns via ASP !!!
On Thu, 17 Jul 2003 19:48:18 +1000, "Anthony Judd" <adsf@.com> wrote:
A permanent change? To a new column name, or one of the originals?>I want to concatenate the two database collumns..
>Any one have any suggestion about how to do this using jet sql..
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
-
Bob Barrows #6
Re: Merge Columns via ASP !!!
Jeff Cochran wrote:
Why use a recordset?> 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
>
Update table set newfield = oldfield1 & oldfield2
Bob Barrows
Bob Barrows Guest
-
Anthony Judd #7
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:> Why use a recordset?> > 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
> >
>
> Update table set newfield = oldfield1 & oldfield2
>
> Bob Barrows
>
>
Anthony Judd Guest



Reply With Quote

