Viewing 15 posts - 466 through 480 (of 583 total)
I don't think you can do it directly from sql. I was able to get image emailed by using powershell to output the file to filesystem and calling the powershell...
June 22, 2009 at 12:27 pm
you stated in your original post that the user has only write access, that is why I stated it need VIEW DEFINITION.
It works fine for a user with full...
June 22, 2009 at 7:55 am
check out the link on how to create triggers. http://msdn.microsoft.com/en-us/library/aa258254(SQL.80).aspx
here is something to help you get started
create trigger trig_name
on table_name
after insert
as
declare @seq varchar(25)
set @seq = (select max(substring(caseid,charindex('-',caseid)+1,len(caseid)))+1 from trgi)
update...
June 19, 2009 at 3:05 pm
check out this quick tutorial on how to do joins. http://www.w3schools.com/sql/sql_join_inner.asp
should be enough info to get you want you want.
June 19, 2009 at 2:22 pm
I think you need the VIEW DEFINITION permission.
June 19, 2009 at 9:51 am
I think he means, Why he didn't have to create a database user(DOMAIN\HRO_QA)for the active directory group server login in the database.
well the answer is the sp_addrolemember proc checks...
June 19, 2009 at 9:34 am
Sorry about that, I had created the example on a 2008 instance. And this is the result I want, either one code but not another or no code at all....
June 17, 2009 at 3:24 pm
You could just use sysusers view in both 2000 and 2005 but if you did want to use sys.database_principals when querying 2005 you can use something like this:
declare @version varchar(20)
select...
June 17, 2009 at 2:52 pm
Check out row_number() function. I think it is what you are looking for.
Or you can add an identity column to the option_answers table.
June 17, 2009 at 2:28 pm
sys.database_principals is a system view that was introduced in SQL Server 2005, it does not exist in 2000. dbo.sysusers view is still available in 2005 (and 2008 for that matter)...
June 17, 2009 at 2:22 pm
best practice is for all table to have at least a clustered index and the EDI_DATA does not have one, and probably the other two table do not have one...
June 11, 2009 at 8:03 am
This works for me. Don't know if it still qualifies as single batch for you.
declare @sql nvarchar(max)
set @sql = '
alter table foo add col2 int;
create index idx on foo(col2);'
exec sp_executesql...
June 10, 2009 at 2:38 pm
Someone correct me if I am wrong, but i think your showcontig results indicate that you do not have any indexes on those table because the index id = 0....
June 10, 2009 at 1:04 pm
The extension of a database file do not matter except for the sake of consistency.
if you want to rename the log file to have ldf extension
alter database < database...
June 10, 2009 at 12:34 pm
Viewing 15 posts - 466 through 480 (of 583 total)