Viewing 15 posts - 46 through 60 (of 74 total)
To build on the previous answer, if this format is more clear, you can use it instead. They're logically equivalent and it illustrates dropping the from clause.
DELETE T
FROM loadprogress.[PUB].[TC-CARD] T
JOIN...
February 29, 2012 at 8:14 am
Making the assumption that you are using the Test_Results table as a filter and don't actually need to see data from it, will something like the following work for you?
SELECT...
February 29, 2012 at 8:08 am
If the only "unique" piece of information you have is Name, you are also running the very real risk of reporting too few teachers. This will happen if there are...
February 24, 2012 at 11:39 am
First guess is that there is a clustered index on the table and I believe that all non-clustered indexes get updated when the clustered index does.
February 21, 2012 at 2:22 pm
Without a lot more information, that's like asking "What's better, a hammer or a screwdriver". In other words, it depends.
February 21, 2012 at 1:23 pm
How about
SELECT
dqid,
DQFlag,
DQLinkID
INTO DMCDUPES
FROM OrangeDataDQ1
WHERE UPPER([MANAGING COUNTRY]) NOT IN (
...
February 17, 2012 at 8:07 am
I think you're going to need to use an OR
SELECT a.a
FROM a
LEFT JOIN b
ON a.a=b.b
WHERE b.b = @MyVar
OR...
February 13, 2012 at 7:50 am
In SSMS, there is an option to include column headers when you copy results or output them to text. It's under
Tools --> Options --> Query Results --> SQL Server -->...
February 9, 2012 at 10:59 am
why bother to spend money on dev and test ones, prod is the best playground! 😀
It also just happens to be the most expensive 🙂
February 9, 2012 at 10:32 am
Have you tried using the OPTIMIZE FOR hint with either a specific value of for UNKNOWN?
February 9, 2012 at 9:58 am
Try something like this:
SELECT CONVERT( XML, N'Blah blah blah <a href=" /xxx/yy/bbb.aspx?ID=111111 "> Entity Name </a>, blah blah blah' ).value( '.', 'VARCHAR(MAX)' )
February 8, 2012 at 10:48 am
You can also do it this way:
SELECT [Buyer],[Seller], TransactionNumber
FROM (
SELECT PersonName,
PersonNameType,
...
February 7, 2012 at 2:34 pm
Use a JOIN instead of an IN. Something like:
UPDATE P
SET P.Cost = P.OrigCost - ISNULL(TaxA,0) - ISNULL(TaxB,0) - ISNULL(Discount,0) +ISNULL( Surcharge,0),
P.Price = CASE
WHEN ISNULL(P.Quantity,0) = 0 THEN 0
ELSE...
February 7, 2012 at 10:53 am
This should work
SELECT CONVERT( DATETIME, [date] + ' ' + [time] )
FROM concat_test
assuming neither of the fields are nullable
February 7, 2012 at 9:50 am
Adam Machanic's very helpful procedure sp_whoisactive http://sqlblog.com/blogs/adam_machanic/archive/2011/04/27/who-is-active-v11-00-a-month-of-activity-monitoring-part-27-of-30.aspx can tell you a lot about what's running if you can run it while the process is happening.
February 6, 2012 at 2:51 pm
Viewing 15 posts - 46 through 60 (of 74 total)