Viewing 15 posts - 13,066 through 13,080 (of 14,953 total)
You can do this with the pivot/unpivot commands. I recommend against it. Use Excel or Report Services.
Set up Excel with a database connection and a view of the...
July 1, 2008 at 11:53 am
I'd use xp_CmdShell, then make sure to call it with a specialized login that has severely limited rights.
July 1, 2008 at 11:50 am
Actually, it doesn't matter what version of SQL Server you are using. xp_CmdShell issues command shell scripts to Windows. Like the old DOS commands (if you're old enough...
July 1, 2008 at 11:45 am
Actually, I'm not sure there is any sane way to cross join two tables without using cross join.
I can imagine that you could create a temp table, with all the...
July 1, 2008 at 11:40 am
You can use CASE in calculated columns (which is what this is). The problem isn't the first "AS", it's the second one. You can't alias a computed column...
July 1, 2008 at 11:32 am
Heap tables or poorly designed clustered indexes is the first thing that comes to my mind.
If, for example, the clustered index is on an alpha column, and inserts regularly have...
July 1, 2008 at 11:22 am
The first question is, are these databases OLTP or OLAP?
For transactional databases (OLTP), with lots of updates, inserts and deletes, having the data files on RAID-1/10/01 is almost...
July 1, 2008 at 11:20 am
Sure. Build a table of time zones and their offset, and query against that. Pretty simple, actually. And can be used in joins for set-based calculations.
July 1, 2008 at 11:10 am
If the other databases were in much heavier use than the one, yeah, they might very well end up taking over most of the cache.
More often, though, there are other...
July 1, 2008 at 11:08 am
Why not rewrite this:
SELECT * FROM (
SELECT ROW_NUMBER() OVER (ORDER BY Col1) AS RowNum, * FROM (
SELECT TOP 100 PERCENT * FROM TableA ORDER BY Col1
) X
) Y
WHERE RowNum BETWEEN...
July 1, 2008 at 9:20 am
Try this:
SELECT [Incident date]
FROM dbo.base_clinical
where isdate([Incident date]) = 0
That will give you the rows where it can't convert that column to a date. From there, you can probably figure...
July 1, 2008 at 9:12 am
The basic way to do this is to select the customer, the question, and the max date in a derived table or CTE, then join to that on all three...
July 1, 2008 at 9:10 am
You might take a look at isolation levels in Books Online. Might find a solution in there. I don't know one off the top of my head.
July 1, 2008 at 8:58 am
Toby White (6/30/2008)
July 1, 2008 at 8:53 am
Viewing 15 posts - 13,066 through 13,080 (of 14,953 total)