Viewing 15 posts - 51,781 through 51,795 (of 59,072 total)
Matt beat me to it (more often than not, lately 😉 ) OUTPUT command in 2k5 will do it just fine.
March 13, 2008 at 10:33 pm
If it's for a report, why not just leave it as NText all the way through?
March 13, 2008 at 10:25 pm
If you don't mind the "pivot"...
SELECT
SUM(CASE WHEN DATEDIFF(dd, AsOfDate, GETDATE()) BETWEEN 1 AND 30 THEN 1 ELSE 0 END) AS [1-30],
SUM(CASE...
March 13, 2008 at 10:17 pm
I really want to know why you're formatting numbers in SQL... that should be done in the GUI if there is one... and it looks like there is one. 😉
March 13, 2008 at 10:05 pm
Make the UDF accept the table name as an additional parameter and pass it. Just remember that UDF's can't do Inserts, Updates, or Deletes on tables nor can it...
March 13, 2008 at 10:01 pm
First things first... please see the link in my signature line for the way to post table descriptions and data in the form of executable code... makes life real easy...
March 13, 2008 at 9:54 pm
Heh... two words...
TALLY TABLE!
I'll be back in a minute with an example...
March 13, 2008 at 9:33 pm
So tell me... why do you think any of that requires a cursor? Or am I misunderstanding your post?
March 13, 2008 at 9:31 pm
Sounds a bit like homework or an interview question, but I'll bite...
In the presence of the correct indexes (composit primary key), the first one will probably be a little faster...
March 13, 2008 at 9:06 pm
The real answer is that you shouldn't store the dashes... that's formatting and it really has no place in the database. I'd make the app strip out the dashes...
March 13, 2008 at 9:03 pm
Heh... AC only if you were off station and the R-12's actually worked. We all know that Lithbro never worked in warm water off the Philipines... we spent 60...
March 13, 2008 at 8:47 pm
I bought the pro copy of WINZIP... it comes with the command line version. It's only $39 US (maybe less now). No, it's not free... but it is...
March 13, 2008 at 8:29 pm
Sure, you could write a VBS script, a smidgen of C# or bit of Java code, or any other number of options. ALL of them will be slower than...
March 13, 2008 at 8:26 pm
Never too late for good info... thanks for the link.
One of the things I've found is that even when you use that method to "disable" parameter sniffing, SQL Server can...
March 13, 2008 at 8:19 pm
Viewing 15 posts - 51,781 through 51,795 (of 59,072 total)