Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql copying column attributes of one table to another table Expand / Collapse
Author
Message
Posted Thursday, May 16, 2013 4:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 16, 2013 6:28 AM
Points: 7, Visits: 8
please find the attached file...

need a query for the table design i have mentioned here...


  Post Attachments 
sql server.txt (17 views, 1.05 KB)
Post #1453422
Posted Thursday, May 16, 2013 5:17 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 9:42 AM
Points: 2,856, Visits: 5,125

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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1453428
Posted Thursday, May 16, 2013 5:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 16, 2013 6:28 AM
Points: 7, Visits: 8
anna tande.... give me d query.. i dnt want nethng else frm u
Post #1453433
Posted Thursday, May 16, 2013 5:23 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 9:42 AM
Points: 2,856, Visits: 5,125
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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1453435
Posted Thursday, May 16, 2013 5:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 16, 2013 6:28 AM
Points: 7, Visits: 8
wat else u need nw
Post #1453440
Posted Thursday, May 16, 2013 5:44 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 9:42 AM
Points: 2,856, Visits: 5,125
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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1453449
Posted Thursday, May 16, 2013 6:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 16, 2013 6:28 AM
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
Post #1453461
Posted Thursday, May 16, 2013 6:13 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 9:42 AM
Points: 2,856, Visits: 5,125
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!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1453467
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse