Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sql copying column attributes of one table to another table


sql copying column attributes of one table to another table

Author
Message
su88rao
su88rao
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 8
please find the attached file...

need a query for the table design i have mentioned here...
Attachments
sql server.txt (17 views, 1.00 KB)
Eugene Elutin
Eugene Elutin
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3042 Visits: 5478
There is no need to duplicate post.

All replies better to go to original one:
http://www.sqlservercentral.com/Forums/Topic1453408-391-1.aspx

_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
su88rao
su88rao
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 8
anna tande.... give me d query.. i dnt want nethng else frm u
Eugene Elutin
Eugene Elutin
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3042 Visits: 5478
su88rao (5/16/2013)
anna tande.... give me d query.. i dnt want nethng else frm u


I don't think that will get you too far here...

_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
su88rao
su88rao
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 8
wat else u need nw
Eugene Elutin
Eugene Elutin
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3042 Visits: 5478
Have you read the article http://www.sqlservercentral.com/articles/Best+Practices/61537/?

Post DDL of your tables, sample data insert script and expected results based on these data. Nothing more.

_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
su88rao
su88rao
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 8
this is for table1 i,e t1

P1 nvarchar(255) Checked
S1 nvarchar(255) Checked
B1 nvarchar(255) Checked
H1 -b1 int Checked
H1 -s1 int Checked
S2 -b1 int Checked
S2 -s1 int Checked
J1 -b1 int Checked
J1 -s1 int Checked

and this is for table 2 i,e t2

P1 nvarchar(50) Checked
S1 nvarchar(50) Checked
B1 nvarchar(50) Checked
Fun nvarchar(50) Checked
Val int Checked
Loc nvarchar(50) Checked


and i have mentioned values and desired output in my previous file... plz check the txt document which is attached u willl get brief idea about it
Eugene Elutin
Eugene Elutin
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3042 Visits: 5478
su88rao (5/16/2013)
this is for table1 i,e t1

P1 nvarchar(255) Checked
S1 nvarchar(255) Checked
B1 nvarchar(255) Checked
H1 -b1 int Checked
H1 -s1 int Checked
S2 -b1 int Checked
S2 -s1 int Checked
J1 -b1 int Checked
J1 -s1 int Checked

and this is for table 2 i,e t2

P1 nvarchar(50) Checked
S1 nvarchar(50) Checked
B1 nvarchar(50) Checked
Fun nvarchar(50) Checked
Val int Checked
Loc nvarchar(50) Checked


and i have mentioned values and desired output in my previous file... plz check the txt document which is attached u willl get brief idea about it


I cannot run anything from what you have posted.

DDL should look like that:

CREATE TABLE MyTable
(
Col1 INT,
Col2 CHAR(1)...
)

Test data should be like that:

INSERT MyTable SELECT 1, 'a',...
INSERT MyTable SELECT 2, 'b',...

And the code you post should be runnable.
Then, I can execute it in my SSMS and provide you with solution for your query.
The amount of time you have spend on posting incomplete information is already few times more than if you would read the article and provide details as suggested above.

There is another way to have your answer. Wait for someone who will be happy to work from information you have posted. I'm sure it will get answered eventually. However, it may take much much longer time...

_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search