Viewing 15 posts - 121 through 135 (of 156 total)
SELECT CASE WHEN CHARINDEX(',', @value) > 0 THEN LEFT(@value,CHARINDEX(',', @value)+2) ELSE @value END
November 8, 2005 at 1:53 pm
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
November 7, 2005 at 2:09 pm
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...
November 3, 2005 at 2:53 pm
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...
November 3, 2005 at 2:47 pm
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...
November 3, 2005 at 2:07 pm
Right click on the Job and select 'View Job history'. Check the box 'Show step details' at the top right corner.
November 3, 2005 at 11:28 am
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...
October 28, 2005 at 1:30 pm
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.
October 24, 2005 at 9:01 am
Thanks Ian. That did it - the query runs in less than 1 second.
One small change - I changed the query to do...
October 20, 2005 at 7:03 am
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...
October 19, 2005 at 1:46 pm
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...
October 19, 2005 at 6:55 am
October 18, 2005 at 2:04 pm
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...
October 17, 2005 at 10:20 am
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.
October 17, 2005 at 6:51 am
Viewing 15 posts - 121 through 135 (of 156 total)