Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,156 total)

  • RE: Audit Trigger

    Suji,

    You can use the System_User and HOSTNAME() function to return the logged in user and his host computer.

    Your trigger should look something like this:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TRIGGER dbo.MyDeleteTriggerName

    ...

  • RE: script out 2005 SQLAgent jobs

    I could bever get the transfer job task to work in DTS, does it actually work in SSIS?

    I haven't had any problems with the transfer jobs task. SSIS...

  • RE: script out 2005 SQLAgent jobs

    Sorry did not read your post in full; I missed automated. Why does this process need to be automated? Are you moving the jobs to another server? ...

  • RE: script out 2005 SQLAgent jobs

    George,

    Open SSMS click on jobs and in the Object Explorer Details Windows you will see a list of jobs. You can highlight all the jobs and right click -->...

  • RE: splitting a string using delimeter

    Good solution Jeff, simply amazing. 😉

  • RE: splitting a string using delimeter

    Adam's post (I seem to recognize it from somewhere),

    I got the string parser script from the script section of this site, I believe 😀

  • RE: splitting a string using delimeter

    I forgot to mention that the solution I posted operates one record at a time. As all of the previous posters have suggested you will need a looping mechanism...

  • RE: splitting a string using delimeter

    You could use a parse function with a select statement to do something like this.

    Note: that this particular function strives off a numbers table which I have provided...

  • RE: Limiting processing to 1m rows at a time

    You can create a temp table, with an identity column and have it auto generate all the way down.

    CREATE TABLE #tmp(

    Row_ID BIGINT IDENTITY(1,1),

    ID INT,

    Col2 INT,

    Col3 INT

    )

    INSERT INTO #tmp

    SELECT ID,Col2,Col3

    FROM MyTable

    SELECT...

  • RE: Insert Script for all the tables in a database

    SQL Scripter is a free tool to dynamically create INSERT scripts. It works fast and well.

    http://www.sqlscripter.com/

  • RE: converting float to decimal

    NP thanks for the feedback. 😀

  • RE: using derived column in calculation

    I'd suggest you use a nested table expression, meaning

    select nestedTSel.*, [Monthly Pac] ....from ( select 'Monthly Pac' = CASEWHEN tPolicyBillPrem.POL_BILL_TYP_CD = '4' AND tPolicyA.POL_CSTAT_CD = '1' THEN tPolicyBillPrem.POL_SNDRY_AMTELSE 0END,'Annualized Premium'...

  • RE: converting float to decimal

    This is actually much easier than you think just run the script as I have it below. This method works because you are converting all the floats to decimal(25,10)...

  • RE: converting float to decimal

    Would it be wise to now change the Datatype

    manually? I checked the table design, and noticed

    the type is still set to float.

    If I am understanding your correctly, you are saying...

  • RE: using derived column in calculation

    Unfortunately, you cannot use derived columns to compute on other columns in the same query. You would have to put the MontlyPac case statement in the then section of...

Viewing 15 posts - 721 through 735 (of 1,156 total)