Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Create a table in SQL server
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 04/14/2008 :  11:56:59  Show Profile  Reply with Quote
From ASP.NET, how to make temporary table in SQL server from select statement which build in a button?
For example, if the user clicks a button a table will create based on statement below:
“Select * from Order where [order by] = ‘Mike Lee’”

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 04/14/2008 :  12:01:29  Show Profile  Reply with Quote
SELECT fields INTO TableName FROM SourceTable WHERE condition.
But i dont think this should be done from your app on clicking a button as it creates table each time so that second time you do this it will error stating that object is already present. This is used only for one time execution unless you change table name each time.
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22864 Posts

Posted - 04/15/2008 :  03:03:39  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by Sun Foster

From ASP.NET, how to make temporary table in SQL server from select statement which build in a button?
For example, if the user clicks a button a table will create based on statement below:
“Select * from Order where [order by] = ‘Mike Lee’”



Why do you want to do this?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000