Viewing 15 posts - 4,396 through 4,410 (of 5,394 total)
Ooops! MDF file has usually id = 1, not 0.
Try to run this and you'll get the file list for your database:
select *
from sys.database_files
April 22, 2010 at 3:23 am
I forgot to mention that this command works on current database, so be sure to issue USE databasename before running.
April 22, 2010 at 3:12 am
No, it's not the only way. You can use the DBCC SHRINKFILE command.
Usually, for the MDF file (file_id=0) you can use:
DBCC SHRINKFILE(0,0)
It shrinks the file with id = 0 (usually...
April 22, 2010 at 3:11 am
It must be some missing property in the connection string. What does product documentation say?
April 22, 2010 at 2:23 am
April 22, 2010 at 2:17 am
What can I say? Good luck and go ahead 😛
I don't see the question here... Which problems did you find doing this?
If you are looking for a sort of...
April 22, 2010 at 1:52 am
In SSMS open the shrink files dialog and choose the MDF file from the dropdown list. Does any free space show up? If so, try shrinking it with the "reorganize...
April 22, 2010 at 1:38 am
I guess you could use a FULL JOIN.
Please read the article linked in my signature, post some sample data and the query you came up with so far and I'll...
April 22, 2010 at 1:34 am
I've seen even worse things in my app (Visual Basic):
Public const SC AS String = "'" 'Yes, you got it right, it's a single quote
....
' Everywhere in the...
April 21, 2010 at 9:16 am
Try this:
SELECT A.*, AV = (
SELECT AVG(amount)
FROM #Orders AS B
WHERE B.product_id = A.product_id
AND B.order_id IN (
SELECT TOP 3 order_id
FROM #Orders AS C
WHERE C.product_id = A.product_id
AND C.order_id < A.order_id
ORDER BY orderDate...
April 21, 2010 at 9:09 am
Try this:
EXEC ('USE databasename; EXEC(''CREATE SCHEMA common'')') AT [127.0.0.1]
It's horrible, but it should work.
Edited: bug in code. Should be ok now.
April 21, 2010 at 8:19 am
To use output values you have to set up the call with an existing variable:
DECLARE @var smallint
exec sp_TLCOMSCandExpertiseArea @CandID = 45,@ExpertiseArea = 11,@var output
SELECT @var
April 21, 2010 at 6:02 am
Try not setting @var value:
exec sp_TLCOMSCandExpertiseArea @CandID = 45,@ExpertiseArea = 11,@var output
April 21, 2010 at 3:15 am
Viewing 15 posts - 4,396 through 4,410 (of 5,394 total)