Forum Replies Created

Viewing 15 posts - 436 through 450 (of 907 total)

  • RE: Moving Stored Procedures

    You can uses DTS to copy them,or you can generate the scripts on one database and then execute them on another.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check...

  • RE: Returning the most recent value

    This might work for you:

    create table #t (week int, store int, price money)

    insert into #t values (1 , 183, .95)

    insert into #t values...

  • RE: Table Name Variable in SQL used in an If..else

    You can use code like this to return a variable from sp_executesql.

    declare @strstor_id int

    set @strstor_id = 6380

    declare @strDatabaseName varchar(10)

    set @strDatabaseName = 'pubs'

    declare @cnt int

    Select @cnt=Count(*) from pubs.dbo.stores v WHERE v.stor_ID...

  • RE: Change Database to match another

    If you built a script for the first set of changes then you are home free, execute it against the second database. I'm guessing you don't have a script.

    You...

  • RE: Connecting to SQL 7 DB using 2000 Enterprise Mgr

    One thing you need to be careful about is DTS packages. If you have the 2000 client you can build and execute packages just fine as long as you...

  • RE: SQLSERVERAGENT problem

    Sending mail using xp_sendmail via QA does not use SQLSERVERAGENT mail, it use MSSQLSERVER mail.

    Do you have the some account running SQLSERVERAGENT service as you have MSSQLSERVER?

    Gregory Larsen, DBA

    If you...

  • RE: Suppress Trailing Zeros?

    Glad to see my code worked for you.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: object modification log

    No it does not. But you can use schema_ver and crdate in sysobjects to build something that will track changes.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out...

  • RE: Suppress Trailing Zeros?

    Here is a method also ugle, but I commented the code:

    declare @n decimal(18,10)

    declare @c char(100)

    set @n = 0.011690000000

    select

    -- get the part before the decimal point

    substring(cast(@n as varchar(18)),1,charindex('.',cast(@n as varchar(18))))...

  • RE: Dropping PK stats

    Thats what I thought. About going the wrong way I agree, but here is the puzzle I am trying to solve.

    I have a slow running query. Granted...

  • RE: Queries keep getting blocked

    You will need to identify what the blocking SPID is actually locking. Once this is identified, you will need to determine who change process to not lock required resource...

  • RE: backup

    Transaction logs help if your database is update during the day, and you want to a restore to a specific time of day in the event you have some kind...

  • RE: Replace String in Stored Proc

    Try something like this:

    declare @line varchar(100)

    set @line = 'this is the first line' + char(13) + 'this is the second line'

    select @line

    -- replace line feed with space

    select replace (@line,char(13),' ')

    Gregory...

  • RE: how can i know the table is changed?

    To get the who changed the table, view, sp, etc. are you getting this information from the T-Log, or some other source?

    Gregory Larsen, DBA

    If you looking for SQL Server...

  • RE: Sending Attachment with Cdosys

    Have you tried to change the attachment method to "AddAttachment"? From prior posts looks like it was suggested that this was the method to use for cdosys. The...

Viewing 15 posts - 436 through 450 (of 907 total)