Viewing 15 posts - 1,081 through 1,095 (of 1,957 total)
Hi, I had a feeling that I had forgotten something important about the XML method...then I remembered...
My revised code (suitable for the test harness):
PRINT 'XML (Mister Magoo)'
SET STATISTICS TIME ON
SELECT...
December 19, 2012 at 7:05 pm
murthyvs (12/16/2012)
I have created this function and using it in a stored proc..
Function call in the stored proc: select * from...
December 17, 2012 at 2:45 am
Jeff Moden (12/16/2012)
Minor mistake in Magoo's excellent code has been corrected in the following...
Thanks for the kind words Jeff, and thanks for spotting my mistake.
I am not sure that col6...
December 16, 2012 at 5:32 pm
Here's a way that uses XML, which you could generate in the web application before passing the data to SQL, or even just convert to XML and pump straight into...
December 15, 2012 at 5:53 pm
A bit late to the party, but this cries out for a bit of "bad practice"...(SELECT *)
-- drop the temporary table if it already exists
if object_id('tempdb..#sample') is not null...
December 15, 2012 at 5:31 pm
As you don't mention exactly what you are trying to achieve, it is hard to give a definite answer, but my guess from your desire to see the date as...
December 15, 2012 at 5:13 pm
lokesha.b (12/11/2012)
-- CAN YOU PLEASE GIVE ME A SINGLE QUERY WITHOUT DOING ANY FUNCTIONS OR TEMP TABLES
SELECT * FROM @T WHERE NAME IN('XYZ','AAA','PQR')
ORDER BY CHARINDEX(NAME, '.XYZ.AAA.PQR.') ...
December 14, 2012 at 6:35 pm
eidjazparwaz (12/7/2012)
I see you have been quite busy with developing. This add-in looks really (:w00t:) nice and really handy. If you need some volunteers to test this add-in i...
December 7, 2012 at 5:06 am
eidjazparwaz (10/1/2012)
Hi Mister Maggo,Thanks for your fast replay. so atm you are writing an addIn? in Which language you gonna develop it??
Best regards,
Eidjaz
Hi there, sorry for the long delay,...
December 6, 2012 at 12:58 pm
And another...but it does involve two tables scans, so I wouldn't recommend it...
SELECT currencypair
, ccy1
, ccy2
FROM
currency
, off_currency_pair
WHERE charindex(ccy1, currencypair) * charindex(ccy2, currencypair) = 4
December 4, 2012 at 6:42 am
As is becoming a habit, I would like to offer up my Identity Hack - rCTE replacement...
It performs quite nicely and doesn't suffer from the dupes problem I have...
December 2, 2012 at 6:50 pm
SQL Kiwi (12/1/2012)
The set-based iteration (WHILE loop) solution may well be best here, but the following is a recursive CTE solution that appears to work correctly:
Hi Paul,
I think there...
December 2, 2012 at 5:51 pm
Because you don't care which are deleted, you can use a CTE with a row number:
Something like this:
;WITH dupefinder AS
(
SELECT
OwnerID,
TimeAccountID,
ROW_NUMBER() OVER(PARTITION...
November 22, 2012 at 4:18 pm
Yes, use an IF in the expression as I said...
=IIF( Weekday( Today(), FirstDayOfWeek.Monday ) = 1,
Dateadd( "d", -2, Today() ), Dateadd( "d", -1,...
November 22, 2012 at 4:06 pm
Viewing 15 posts - 1,081 through 1,095 (of 1,957 total)