Okay, here's what I've come up with we'll see how it goes...

SELECT lanesID, subcategoryID, name, availability, price, srp, cost, description
FROM dolls_backup
INSERT INTO tblProducts(ProdName, ProdDesc, ProdSRP, ProdPrice,
ProdCost, SubcatID)
VALUES (dolls_backup.name, dolls_backup.description, dolls_backup.srp,
dolls_backup.cost, dolls_backup.subcategoryID)

~ Donna


On Thu, 18 Nov 2004 13:49:06 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> You'll have to check on the exact syntax, but something like this should work:
> 
> INSERT INTO myTable
>   (col1, col2, col3)
> SELECT col4, col5, col6
> FROM otherTable
> 
> The SELECT can be as complex as you want, as long as the columns it
> returns are the same number and type as what is needed by the INSERT
> portion.
> 
> cheers,
> barneyb
> 
> On Thu, 18 Nov 2004 15:33:40 -0600, Donna French <[EMAIL PROTECTED]> wrote:
> > I am redesigning an SQL database and need to know if it's possible to
> > select specific tables/columns from the original into specific
> > tables/columns in the new database. I know I can select the columns I
> > want but moving them into a specified column in the new db that isn't
> > the same structure is what I'm not sure of.
> >
> > Any help appreciated.
> >
> > --
> 
> -- 
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/blog/
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184823
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to