Hello,
I have a database with a filegroup spread across 2 disks; data file on disk1, and log file on disk2. The current situation is that disk1 has failed, and the primary data file is gone and there is no possibility of recovering it. What I have now is:
1.) the log file on Disc2, 50gigs...
Hello,
A friend gave me his laptop to trouble shoot... initially I thought it just had a bad HDD because it would be accessible for only a few minutes every few hours before disappearing and becoming inaccessible.
However, now the machine will not even power on. It went from a HDD issue to a...
cdogg, your advice for the latitude did the trick. Cutting all power sources and then holding the power button for approx 30 seconds, plugging in AC, and then trying to power up brought it right back to life. No problems since.
I was absolutely amazed b/c I was convinced it was dead, I was...
Hello,
Last night I had my wife's machine turned on and sitting on the coffee table. I dozed off acidentally for about 15-30min and when I woke up the machine had lost power. Now the machine is completely dead, it shows no signs of life. No blinking lights, no noises, no nothing.
We've...
DBAWinnipeg, this is a kludge and a long-shot, but within enterprise manager perhaps you could use a record-a-macro app like macromaker to record the simple action of changing the account settings on a DTS package and moving on to the next package, then set the macro to replay for a number...
SELECT *
FROM TABLE
WHERE DATEFIELD = GETDATE()-1
If the column were a datetime data type, use the below for mm/dd/yyyy output...
SELECT Date = CONVERT(VARCHAR(10),DATEFIELD, 101)
FROM TABLE
WHERE DATEFIELD = GETDATE()-1
In the query, identify the columns specifically in the SELECT statement and use the CAST or CONVERT functions to change the date time field to a char data type.
Such as,
SELECT CAST(datefield AS varchar) AS convertedDateField
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data...
The number 4 represents the number of character spaces from the edge to include.
SELECT RIGHT(myField1, 4)
FROM myTable
and
CONVERT(varchar(10), myField1, 101) AS fieldName
If you can't get specific enough (easily enough) with a query to delete a specific row, you may want to consider changing the design of the database, or using temp tables to add a unique identifier for each row and then querying from the temp tables.
A delete/where is the easiest way to do it.
delete _tableName_
where _columnName_ = '_someValue_'
For all but the smallest of projects, finding and deleting a specific table/row in Enterprise Manager is unessecary and slow. Anything you can accomplish using the GUI you can accomplish...
for the date '01/01/1900'...
SELECT *
FROM _TABLE_
WHERE MONTH(_DATEFIELD_) = '01'
And DAY(_DATEFIELD_) = '01'
And YEAR(_DATEFIELD_) = '1900'
Might work.
scrath the cast... if the account field in the view is defined as a char data type then sql server should just convert it I think..
I could be wrong.
@_@
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.