Can it be done in SQL
Posted in 1996
I want to insert some rows into a detail table. The question is how can
I, in SQL, create line numbers for the rows being inserted without
hardcoding them?
I could probalby do it with a stored procedure but would prefer using SQL.
For example I want the_line_number to be incremented for each row os that
line_no is a valid line_no.
EXAMPLE:
insert into line_no, col1, col2
select the_line_number, table.col1, table.col2 from table where col2 = "a"
Please reply via email if you can.
Thanks,
Toby Denbow
tdenbow@mathworks.com
== Toby Denbow ========================= tdenbow@mathworks.com ==
The MathWorks, Inc. info@mathworks.com
24 Prime Park Way http://www.mathworks.com
Natick, MA 01760-1500 ftp.mathworks.com
==== Tel: 508-647-7243 ==========================================