Forum Replies Created

Viewing 15 posts - 121 through 135 (of 156 total)

  • RE: Not round value

    SELECT CASE WHEN CHARINDEX(',', @value) > 0 THEN LEFT(@value,CHARINDEX(',', @value)+2) ELSE @value END

  • RE: Event within last 2 minutes

    CREATE TABLE #TableA (ID int, LastUpdated datetime)

    INSERT INTO #TableA VALUES(1, DATEADD(d,-1,getdate()))

    INSERT INTO #TableA VALUES(2, DATEADD(mi,-1,getdate()))

    SELECT * FROM #TableA WHERE LastUpdated > DATEADD(mi,-2,getdate())

    DROP TABLE #TableA

  • RE: Restore database to the point

    You have to use the NORECOVERY syntax while doing restore to a point in time.

    restore database TestData

    from disk = 'C:\TestData.BAK'

    with move 'TestData_Data' to 'D:\data\TestData_Data.mdf',

    move 'TestData_Log' to 'D:\data\TestData_Log.ldf', NORECOVERY

    RESTORE LOG TestData

    FROM...

  • RE: if statement in stored proc

    You will need to put a BEGIN....END statement. Put a BEGIN after the IF statment and and END before the ELSE Statement. This will execute all code between the BEGIN...

  • RE: Problem creating a view

    CREATE TABLE #ChargeDetails (Col1 int IDENTITY(1,1), InvoiceNum int, TotalFee decimal(14,2))

    INSERT INTO #ChargeDetails

    SELECT 26193, 200 UNION ALL

    SELECT 26193, 30 UNION ALL

    SELECT 29229, 160 UNION ALL

    SELECT 29229, 30 UNION...

  • RE: Where can u find why a job failed??

    Right click on the Job and select 'View Job history'. Check the box 'Show step details' at the top right corner.

  • RE: DTS

    Try this

    http://www.sqldts.com

     

  • RE: DTS for multiple users at the same time

    If the target file (excel) is on the network and all users are exporting to the same file then you will get this error. If the target in on a...

  • RE: Server Logs - Creation Date

    These are backup taken today on the production server and the time on the server is today. They are consecutive backups but the dates are different.

  • RE: Query Fine-Tuning

    Thanks Ian. That did it - the query runs in less than 1 second.

    One small change - I changed the query to do...

  • RE: error "database in use" when trying RESTORE or DETTACH my database

    Use sp_who to find the SPID. If you are restoring from QA, check that your are not running from the same database. Change db to MASTER. If you have Enterprise...

  • RE: Query Fine-Tuning

    An employee can have more than 1 time clock record in a day. He could be clocked in on multiple jobs. This returns multiple rows for each employee.

    I get...

  • RE: ExecuteSQLTask SQLStatement Property Name

    I think this is what you are looking for.

    http://www.sqldts.com/default.aspx?205,2

    HTH

  • RE: Updating line in table based on another line

    Test before running script in production.

    create table #tempA (CaseRef varchar(50), DateCode varchar(10), DateOpened datetime, DateDue datetime)

    INSERT INTO #tempA VALUES ('ABC/0002/0860', 'FILREV', Null,Null)

    INSERT INTO #tempA VALUES ('ABC/0002/0860', 'STATUS', '2005-01-25','2005-01-25')

    INSERT INTO #tempA...

  • RE: Checking for a file''''s footer

    In a Do ..Loop read until AtEndOfStream  In the loop store each line into a variable. After the loop ends, read the the last line to check for Footer details.

Viewing 15 posts - 121 through 135 (of 156 total)