I have a list of database users which I'd like to change the passwords for across the board. The SQL writers have requested an Excel file with two columns (username and password to be), but I don't know how to export the single column in either a notepad document or into excel. Any help would be appreciated.
Thanks!There are literally dozens of ways to do this. For a one time deal I'll usually just copy past the columns out of Enterprise Manager or Query Analyzer. It will paste right into Excel no problem.
If you want to get a little more fancy with it you can use an Excel query. Excel is capable of connecting directly to SQL Server and pulling down data. Check out this little article that explains the basics.
http://iis.asu.edu/ceslab/kb/excelquery.htm|||Use query analyzer
Type the following code:
Select dbo.tablename.field1, dbo.tablename.field2 from tablename
tablename as ur tablename which contain the information u required. Field1 is ur fild name.
Example: If the database has user table and it has field like employeeid, employeename, employeepassword, employeemail.
you can select ur records by the following code
Select employeename, employeepassword from user
Run this code and copy ur result to excel sheet.
or you can use Queryanalyzer-->Query Menu-->Result to fle (Then run the code and save the file.
No comments:
Post a Comment