is there an sql statement to insert data to one table and getting the data from another table
Ok I have a table that have general categories with just name and CatNo. Now what I want to know is when I create a client to move all the data in general categories to another table called categories that have the clientid to associate it with the client. I would appreciate for any help
what is your question here??Shravan Addaypally MCP...how to create a new sql table from xml table through coding
I have a xml tableProgramatically I have to convert the data to sql table and show the data in the grid view from the sql tableall I have to do by coding onlycan it be possible
As far as I know Torque can generate SQL source from an XML schema describing a database structure: http://db.apache.org/torque/releases/torque-3.1.1/generator/
However you need to do that throught coding which is not as simple as it sounds.
You may have to transform xml schema to sql schema manually or use xslt.
Or you can load xml schema into dataset and create database schema from dataset.
Hop...how to create a new table based on the data from a old table
if I am doing normalization, I want to delete some rows from an existing
table then create a new table base on these data. For exaple
I have a talbe like this
my statement is
select name,id from tp group by name, id;
then the output is
this is the contents of my new table I want. How can I create this new
table with a new name?
Try SELECT Distinct
<gretp> wrote in message
> if I am doing normalization, I want to delete some rows...creating a table column that only takes data from another table.
I am trying to create a table that holds info about a user; with the usual columns for firstName, lastName, etc.... no problem creating the table or it's columns, but how can I "restrict" the values of my State column in the 'users' table so that it only accepts values from the 'states' table?ScottSEADont forget to click "Mark as Answer" on the post that helped you!This credits that member, earns you a point and mark your thread as Resolved for the sake of Future Readers.
You could create a trigger on the table or a rule?***********************Dinakar NethiLife is short. En...Updating a Table data from Another table using Sql Server 2000
I have a Problem while updating one table data from another table's data using sql server 2000.
I have 2 tables named TableA(PID,SID,MinForms) , TableB(PID,SID,MinForms)
I need to update TableA with TableB's data using a single query that i have including in a stored procedure.
use this type of query
update myTable2 set SID= (select top 1 SID from myTable1)Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
u can use SELECT column_name(s) INTO newtable [IN externaldatabase]
FROM sourcee.g.SELECT * INTO Persons_backup...Creating a Table from another Table.
I need to be able to create a temporary table that is exactly like an
existing table. In Oracle, the syntax to do this was as follows:
CREATE TABLE NEWTABLE AS (SELECT FROM EXISTINGTABLE);
This effectively copies the table structure and creates a table called
newtable that is
a "clone" of the existing table.
How can this be accomplished in SQLA, short of writing a stored
procedure or a function?
Thanks for your response.
Consolidated Services Corp
SELECT * INTO NewTable FROM OldTable
Jaguar Product Team
Owen Hebert wrote:
> I...How to create SQL Tables from Random XML files and Upload its data to those tables
Hi,I was wondring if there is a way to automatically create SQL Tables when an XML file is uploaded and load its data to that SQL table? So here is what I was thinking:1- Create a xsd file from that XML2- Create the SQL Table from that xsd3- Upload the data to that table.
Is this possible?
I have done something like this before, but the colum data type is Variant which I don't want.
using Microsoft.SqlServer.Management.Common; using M...Create new table
Hi,I am creating a new table called 'tableA'TableA has 2 columns - columna and columnb..I would like the values of tableA's columna to be the same as tableBs' (a current table) columna...Does that make sense?Can I use a computed column? Will it still work if table b's columna has new data added all the time (will tablea keep up to date?) Thanks,Jon
In the sense you want to and fro values to be same from both the tables.I think its a one way possibility but not the two way
here is the query
take the wizard and follow the steps in the sense
1)in ur BLL def...How to move data from one table to another table w/o affecting the table definition?
I have a production server and a development server. On the production server, I have a table (thin a database) that already contains data. On the development server, I created a table (still within another database) and I want that table of the development server to contain the data from the table of the production server. But, both tables don't have the same table definition, meaning in the table of the development server, I have added a new column named ID that I want to use as a primary key column, but I don't have tha...How to select data from a table and insert the selected data in the same table as new row
I have a table called Version and its attributes are Version_ID, Project_ID , Hospital_ ID , Date_Created and comments. I want to select the data by Version_ID,Project_ID and Hospital_ID and the selected data is inserted in the same table(Version) as new row .
Table: Version (Version_ID(Primary_key), Project_ID(Foreign_Key),Hospital_ID(Foreign_Key),Date_Created,Comments).
Iam using Visual Web Developer Express 2005 and SQL Server 2005. Iam doing on asp.net 2.0.
Could anyone please send me the code in asp.net 2.0 for the above problem. ...How do you copy table data to another table?
I need to copy existing row data from one table into a new row in a different table, both in the same database. Can this be done in a stored procedure where the selected row is passed in as parameter value?
There's plenty of ways you can do this.Try
INSERT INTO YourTable (.column list)
***********************Dinakar NethiLife is short. Enjoy it.***********************
that easy? thank you. I am getting that 'can't see the forest for the trees' feeling....How to create a table with datarow from another table?
Hi, I am trying to display a table with values obtained from a datarow of another table. The purpose of this is because I want to create a table showing a list of records that were updated. (meaning records not updated would not show in table)Usually, I would fill a dataset and just add a new row. However, there is no dataset I would like to fill. I want a blank dataset/ datagrid, and just add rows with fields in it. I figure either:1) fill a blank dataset and add rows into it, or2)create a table and add rows into it. I am not sure 1 can be done, so.....I am guess 2 is more likely. Can...How to create a temporary table from another table
Please tell me how to create a temporary table from another table ?
give me a example,any advise is appreciate!
Please post this question in the ASE.General newsgroup. This group is
for EAServer issues.
Dave Fish [TeamSybase]
On Sat, 2 Mar 2002 23:12:16 -0500, yfz wrote:
> Please tell me how to create a temporary table from another table ?
>give me a example,any advise is appreciate!
...Create new Table from existing table
I'm trying to Create a new Table from existing table in Q/Analyzer. I figured it would be something like this:
CREATE TABLE newTable AS(SELECT * FROM OldTable);
but i keep getting
Server: Msg 156, Level 15, State 1, Line 1Incorrect syntax near the keyword 'AS'.
also.. is there another method of doing this, something like
INSERT INTO newTable(SELECT * FROM OldTable);
and it creates the table ( newTable ) for u if it doenst already exist??
im using sql2000
You can try this one:
SELECT * INTO newTable FROM OldTableLimno
The easiest method to copy ...