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

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 DBA basics

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2012-10-20 : 15:11:55
Hi,
Where/how do you suggest to start learning about the basics of a DBA please?
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-20 : 17:32:13
start with MSDN documentation books online. follow posts here in Administration forums and importantly try it out yourself. Post in case of any doubts

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

apshathish
Starting Member

2 Posts

Posted - 2012-10-23 : 09:18:54
Hi,
I am facing below error. Could someone please help on this.?

Msg 121, Level 15, State 1, Line 1
The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.

Below is the query.

INSERT INTO dbo.table3 (ID, Value)
select * from dbo.table1
inner join dbo.table2
on dbo.table1.ID = dbo.table2.ID

Reason is while retrieving data am getting below result set.

Note : ID and Value are column name.

ID Value ID Value
1 First 1 First
2 Second 2 Second
3 Third 3 Third

But it should be single, I mean ID and value column only should come. So it would be great if someone can help for me.

S
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2012-10-23 : 11:57:57
your select statement will get all the columns *from both the tables*
and they don't map to table3.

Always declare the columns in the INSERT.

Also -- start your own post!"

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-23 : 18:40:55
first decide which Value column you want to retrive ie from table1 or table2

and use actual columnnames in select

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2012-10-24 : 07:51:18
I thought this was a thread on DBA question? :-(
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-10-24 : 08:00:08
A hijack. Where are the police :).

I would start a new thread.
As to DBa - work with someone experienced and learn from them. Also don't neglect sql.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -