Showing posts with label spreadsheet. Show all posts
Showing posts with label spreadsheet. Show all posts

Friday, March 9, 2012

Getting nulls in SQL2005 table while importing from EXCEL spreadsheet

I am trying to import an Excel Spreadsheet into SQL2005. There is a column in the spreadsheet that has character values, and numbers. I have formatted the numbers as text on the spreadsheet. I have declared the column on the table as char/varchar/nchar, but whatever I do, the numbers don't get imported into the table, but show up as nulls. Any idea why?

Thanks

Mangala

Search the forum. It's a common issue.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1872950&SiteID=1

Wednesday, March 7, 2012

getting logins and users for all server in the enterprise

I am trying to mantain a database of all logins and users, Please help, is
there a way I can populate a spreadsheet with all the users and logins for t
he entire enterprise. We have over 30 installations of sql server, doing it
singly using sp_helplogins
or sp_helpuser for each server will be very difficultHi,
You can write a small batch file and redirect the output to a file.
OSQL -Usa -Ppassword -Sservername -d master -Q"select name from syslogins"
>c:\users\logins.txt
OSQL -Usa -Ppassword -Sservername -d master -Q"select name from syslogins"
OSQL -Usa -Ppassword -Sservername -d master -Q"select name from syslogins"[vbcol=seagreen]
Do the same for all servers.
If you need all the logins and the database users associated then:-
OSQL -Usa -Ppassword -Sservername -d master -Q"sp_helplogins"[vbcol=seagreen]
>c:\users\logins.txt
OSQL -Usa -Ppassword -Sservername -d master-Q"sp_helplogins"
OSQL -Usa -Ppassword -Sservername -d master -Q"sp_helplogins"[vbcol=seagreen]
Do the same for all servers.
Save this as a batch file and run when ever you require
Thanks
Hari
MCDBA
"zukky" <zukky@.discussions.microsoft.com> wrote in message
news:BADF8A1F-722D-48AF-A2F5-6C1FC2A92B03@.microsoft.com...[vbcol=seagreen]
> I am trying to mantain a database of all logins and users, Please help,
is there a way I can populate a spreadsheet with all the users and logins
for the entire enterprise. We have over 30 installations of sql server,
doing it singly using sp_helplogins or sp_helpuser for each server will be
very difficult