Forum Replies Created

Viewing 15 posts - 16 through 30 (of 60 total)

  • RE: Creating a Script from a Stored Procedure

    Very good content. Help me a lot especially in debugging and printing reports directly from store procedures.

    One question. Is the method sp_OAXXXXX create security issues, such as the person need...

  • RE: SQL query analyzer wont beep or play a sound.

    Do you configure Query Analyzer to play wave sound when complete query batch? Check it out.

    Go to Tools -> Options -> Results -> Click at the option "When Query Batch...

  • RE: TABLE TO SP

    I am not quite agree with MikeyMikey for the second reason regarding the temp table. It will not overwrire the temp table because another new temp table will be create for...

  • RE: TABLE TO SP

    Dynamic SQL will be slower than static SQL, but this performance issue is solved by using sp_executesql instead just use EXEC. sp_executesql will avoid recompile in the store procedure. Check...

  • RE: TABLE TO SP

    Hi srqanqu,

    I have one suggestion. You can pass the name of the table to the store procedure. Inside the procedure you will query the table using simple SQL statement!

    For example:

  • RE: trigger problem

    Avoid create trigger just because you want to populate the updates to the similar table at another server. Use replication feature instead. If the table do not have the same...

  • RE: trigger problem

    Hi ambrose_sql,

    I'm not very understand what is the meaning of the part in green color:

    CREATE TRIGGER insert_into_emp ON emp

    FOR INSERT,UPDATE,DELETE

    AS

    SET...

  • RE: Need to create an ongoing job that deletes all recs from a table and only retain last 21 days based on a date field?

    Use function either user-defined-function or system function may cause the query analyzer do not use indexes (if any) when doing queries for deletion. If not counting on performance, then Bert's...

  • RE: Need to create an ongoing job that deletes all recs from a table and only retain last 21 days based on a date field?

    Peter, try to use this statement:

    DELETE FROM TableX x

    WHERE x.DateFields < dateadd(dd,-21,convert(varchar(8), getdate(),112))

    With this statement, you can solve Grasshooper's problem with time.

    You can reschedule the job to run daily...

  • RE: Insert Speed

    Bulk insert will request a lot of space in transaction log when using Full Recovery method. If your server's hardrive is limited, better to move the insert files' bulk insert...

  • RE: Killed SPs and sqlserveragent stop working

    Tyang, you should not kill all processes that have status 'sleeping'! Some is using by SQL Server itself and used only when some events triggered.

    If you insist to kill the...

  • RE: DTS Package execution fails Error (800403FE)

    Andre, I think you should listen to the SQL Server's advice to run the program when the server is not busy with updates. Try to reschedule the DTS to run...

  • RE: write xp_cmdshell with params to text file

    Please notice that xp_cmdshell only receive command string with varchar(255) or nvarchar(4000) only. Do not put command string longer that the specify length or it will truncated without any warnings.

     

     

     

  • RE: Temp Table Name

    If you are using local temporary table, SQL Server will automatically add the timestamp (the time temp table created) at the back of the orginal table name. Try to avoid...

  • RE: Forcing order of evaluation

    Check your data, whether there are any invalid numeric data, such as invalid characters (for numeric), such as space (behind or in-front), comma etc. Try to use LTRIM() and RTRIM().

     

Viewing 15 posts - 16 through 30 (of 60 total)