Viewing 15 posts - 121 through 135 (of 264 total)
I'm doing 70-462 next week and I'm not even a DBA. Trouble is you now need all three to get a qualification. Have set up local environments to practice on...
March 11, 2013 at 4:33 am
Can you just look for TransCode being a substring of @TC?
March 8, 2013 at 10:31 am
This was a good question and there's been a bit of "OP bashing" here.
The question asked if an infinite loop was created which it definitely is. The fact that...
March 1, 2013 at 7:38 am
handkot (2/26/2013)
the answer is ambiguous and depends from collationsget my point back 🙂
Does that mean you assumed the collation was Case Sensitive? Normally, when no specific information is given, it's...
February 27, 2013 at 2:23 am
Try this bit in the middle:
SELECT @contact_id = contact_id,
@staff_issued = staff_issued
FROM inserted
The inserted "table" contains the record you have inserted whilst contacts won't know which record you want.
February 26, 2013 at 10:16 am
Create a table with the same structure as the output from sp_help (e.g. tblHelp) and modify your code to insert to it, e.g.
Select @sql =
February 8, 2013 at 9:12 am
I don't see the benefit of the subqueries here. Also your "New" filter should use a >= rather than just an =.
Does
AND IMF.ImportDate > DATEADD (day,-60,getdate())
AND CASE WHEN ImportDays>=DATEADD...
February 5, 2013 at 7:42 am
Interesting that we currently have four people who picked "neither". I suppose it could all be done in Excel, but.......
January 24, 2013 at 4:16 am
A NOT EXISTS may be better than a NOT IN
Something like
SELECT CONVERT(VARCHAR(4), R.FCde) AS Flty
FROM Rtns R
WHERE NOT EXISTS (
SELECT 1...
January 23, 2013 at 11:00 am
... sorry, didn't notice you were on SQl Server 2000. I han an answer for 2005+.
January 23, 2013 at 8:26 am
If the table has a key column another option would be to UNPIVOT it into a temp table and then do your update based on that. For example you could...
December 14, 2012 at 7:37 am
Bit worrying how many people found this easy without giving any consideration to what the default schema might be for the user. Easy to get it right if you assume...
December 7, 2012 at 2:33 am
Looking forward to our friends in the USA helping out with a cricket question 🙂
November 21, 2012 at 2:38 am
Phil Parkin (11/16/2012)
You just responded to a three-year-old post!
So, just add 3 to the result and all will be well 😉
November 16, 2012 at 9:15 am
If using SQL2008 you can also use a MERGE instead of the INSERT...WHERE NOT IN structure. This should be much more robust and considerably faster.
October 23, 2012 at 3:40 am
Viewing 15 posts - 121 through 135 (of 264 total)