Posted By: qwert231 | Dec 29th, 2008 @ 1:46 PM
page 1 of 1
Comments: 9 | Views: 673
qwert231
qwert231
M Kenyon
I'm not sure why this isn't working
ZippyV
ZippyV
Fired Up
Too small, unreadable.
It is a bit small, but the first couple lines appears to be:

DB_ID(N'IntranetApps')
GO

What is this code supposed to be doing? My first guess was that you were trying to switch the connection's current database to "IntranetApps", which would look like this:

USE IntranetApps
GO

But the rest of the code doesn't require that. Remove it?
Hmm...Formatting is not what I expected (based on the preview), but hopefully you get the idea.
Dodo
Dodo
I'm your creativity creator™ :)
qwert231 said:
I'm not sure why this isn't working

And I'm not sure why you posted this extremely small screenshot instead of copy'n'pasting the code as text. I tried text detection and sharpening filters on the image and still couldn't read it.
DB_ID(N'IntranetApps')
GO

SELECT * FROM sys.dm_db_index_physical_stats
(DB_ID(N'IntranetApps'), OBJECT_ID(N'...'), NULL, NULL, 'DETAILED')
GO

where ... is the name of an object in his database.

qwert231, check out example C in DB_ID (Transact SQL) [MSDN].

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
You can get SQL formatting like this: [ code language="SQL" ] code here [ /code ]
Just remove the extra spaces around the [].

EDIT: Ok, apparently that doesn't work. I know the code formatter they use supports SQL (since I wrote it Tongue Out ), but apparently C9 isn't exposing it.
TommyCarlier
TommyCarlier
I want my scalps!
SELECT * FROM sys.databases
Edit: it works when you put "sql" in lower case letters. Yay for case-sensitivity.
littleguru
littleguru
<3 Seattle
Yeah... he's a source of unanswered questions. And now we are at a question without a question Big Smile
page 1 of 1
Comments: 9 | Views: 673
Microsoft Communities