Hi James,
I'm glad that worked for you.
I have a question that you may be able to help me with.
I have a colleague that is looking to relocate to Australia (Melbourne area). He's interested to know,
What the current work opportunities are like?
If its possible to get contact information for IT firms in the area?
Specific skills that are popular right now in Aus?
His current skill set is VB6,VFP,ASP,HTML,JAVASCRIPT and SQL Server 2000.
Please excuse the direct message regarding this but its always really interesting to know what's happening in another country.
Regards
Jon
>It works beautifully. Thanks.
>
>>Try this.
>>
>>/* declare the variable for the current table and schema */
>>declare @CurrTable varchar(40), @CurrSchema varchar(40)
>>
>>DECLARE tables_cursor CURSOR FOR
>>SELECT TABLE_NAME, table_schema
>>FROM INFORMATION_SCHEMA.TABLES
>>WHERE TABLE_TYPE = 'BASE TABLE'
>>
>>OPEN tables_cursor
>>
>>-- Perform the first fetch.
>>FETCH NEXT FROM tables_cursor
>>
>>-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
>>WHILE @@FETCH_STATUS = 0
>>BEGIN
>> -- This is executed as long as the previous fetch succeeds.
>> -- EXEC sp_addrolemember 'db_datareader','Jon'
>> FETCH NEXT FROM tables_cursor into @CurrTable, @CurrSchema
>>
>> /* grant permission, but 'grant' does not like @CurrTable */
>> /* grant select on @CurrTable to ReadOnlyUser
>> EXEC ('GRANT SELECT ON [' + @CurrTable + '] TO ReadOnlyUser')
>>END
>>
>>CLOSE tables_cursor
>>DEALLOCATE tables_cursor
>>
>>Jon
>>
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only