| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

12-18-12, 07:48
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 3
|
|
merging two databases,
|
|
hello friends,
Please help me to sort out this pbm as I am new to job and struggling to continue, I am usin sql 2012
i have two tables named sales and purchase and both have same fieldname called tr_item and tr_quantity. in a database called X
what I have to do now is , I have another database named Y and der I have to create a table named TAB which contains same tr_item,ptotal,stotal
tr_item= same tr_item from sales and purchase of database 'X', and also total of tr quantiy sales
ptotal = total quantity of purchase ,
stotal = total; quantity of sales.
please help me to sort out , my TL said to use while and use append to do it. please help me.
|
|

12-18-12, 09:49
|
|
Registered User
|
|
Join Date: Dec 2008
Location: At work...
Posts: 79
|
|
This isn't really an ANSI SQL related issue.
I suggest you ask your question in the MS SQL Server forum instead, the people over there can probably help you!
|
|

12-19-12, 00:26
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 3
|
|
|
how to use two databases
|
|
--------------------------------------------------------------------------------
hello friends,
Please help me to sort out this pbm as I am new to job and struggling to continue, I am usin sql 2012
i have two tables named sales and purchase and both have same fieldname called tr_item and tr_quantity. in a database called X
what I have to do now is , I have another database named Y and der I have to create a table named TAB which contains same tr_item,ptotal,stotal
tr_item= same tr_item from sales and purchase of database 'X', and also total of tr quantiy sales
ptotal = total quantity of purchase ,
stotal = total; quantity of sales.
please help me to sort out , my TL said to use while and use append to do it. please help me
|
|

12-19-12, 00:29
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 3
|
|
|
how to use two databases
--------------------------------------------------------------------------------
hello friends,
Please help me to sort out this pbm as I am new to job and struggling to continue, I am usin sql 2012
i have two tables named sales and purchase and both have same fieldname called tr_item and tr_quantity. in a database called X
what I have to do now is , I have another database named Y and der I have to create a table named TAB which contains same tr_item,ptotal,stotal
tr_item= same tr_item from sales and purchase of database 'X', and also total of tr quantiy sales
ptotal = total quantity of purchase ,
stotal = total; quantity of sales.
please help me to sort out , my TL said to use while and use append to do it. please help me
|
|

12-19-12, 02:49
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
|
|
two comments
first, if you are using sql server 2012, you are in the wrong forum
second, your TL is wrong -- WHILE is not required, and "append" is valid only in the sense that you need an INSERT statement
|
|

12-19-12, 02:50
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
|
|
your TL is wrong -- WHILE is not required, and "append" is valid only in the sense that you need an INSERT statement
|
|

12-19-12, 03:41
|
|
Jaded Developer
|
|
Join Date: Nov 2004
Location: out on a limb
Posts: 10,508
|
|
threads mergered and moved to the SQL server forum
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|