Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 27th, 2004, 07:59 PM
mch mch is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mch
Default nested insert query/...how?

Hi all

i am trying to put data into a table from a query...

i can use a the select/into method...which works...however i need to continually delete/recreate the table...which is not efficient given that i want to do this every ten seconds..(a trading application)
(select into only works if creating the destination table..)

i have been trying to do this with insert/nested select query..however insert only allows scalar values...

ideally i would like to just erase the table every 10 seconds and use insert or something similar....

any suggestions...thanks for any input

mch

 
Old April 27th, 2004, 09:44 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

would creating a temp table help

select productname as products,
unitprice as price
,(unitprice * 1,1) as Tax
into #PriceTable
from products

to view results
select * from #priceTable

 
Old April 28th, 2004, 08:46 AM
mch mch is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mch
Default

thanks...temp table was the answer...amazing how these things are easier the next day...

i am using the format

insert into tablename
select * from table where...group by....

then delete table and use again...

thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested query deb1980 ASP.NET 2.0 Basics 2 April 10th, 2007 04:38 AM
Nested Query Help Needed Corey Access 2 April 26th, 2006 02:17 PM
Nested Query teclo MySQL 1 March 22nd, 2005 07:20 AM
Nested Query BrianWren Oracle 5 February 1st, 2005 01:45 PM
Nested Query Trouble ashley_y VB How-To 1 December 23rd, 2003 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.