Append Rows?

Append Rows?

Post by Damo » Wed, 03 Mar 2004 23:38:05



Hi,

I have a table with 990 rows, I want to be able to copy these rows and
attach them on the end of the last row, any ideas on how I can do this?
Would appreciate the help.

Thanks

Damon

 
 
 

Append Rows?

Post by Vishal Parka » Wed, 03 Mar 2004 23:51:42


Quote:>> attach them on the end of the last row,<<

use syntax INSERT INTO....SELECT as i've shown you in the earlier post. since your destination
and source tables are same you can have query as

insert into <source_table> (col1,col2)
select col1,col2 from <source_Table>

Also remember that, table is an unordered set of rows. To assure the retrieval order of the
rows always make use of "order by" clause in the select statement, it does not matter in what
order rows are getting inserted.

--
Vishal Parkar


 
 
 

1. Appending Rows to Columns

Hey everyone,

I'm running Win2k Adv Srv's with SQL 2000 SP1.  I was just wondering if
anyone knew of an SQL statement (or group of statements) to append what
would normally return in rows into a single column.  This one has had me
stumped for a while.

i.e.

SELECT Column1, Column2 FROM Table1
returns
Column1  Column2
---------  ----------
Text1       Version1
Text1       Version2
Text2       Version1
...

Would there be a way (of course using a different query) to have it return
Column1   Column2
---------   ----------
Text1        Version1, Version2
Text2        Version1

With or without seperators?

Thanks,
Nate

2. Call stored procedure in JScript

3. Deleting/appending rows in SQL 6.5

4. FPW2.6 - Printing to LaserJets

5. Vc++ and Dbgrid 5.0 ( append rows problems )

6. CFP Visual'96

7. Appending rows to a cursor

8. Floating Bug in OI1.2

9. DTS ...how to append rows to a text file...

10. Appending Unique Rows