Viewing 15 posts - 7,606 through 7,620 (of 8,731 total)
I'm glad that I could be of help. It's weird to be called Sir Luis, makes me feel like someone important. 😀
October 15, 2013 at 9:06 am
Not exactly what you might be looking for, but instead of trying to add commas after each character, you can use a subquery in the IN clause. Something like this:
WITH...
October 15, 2013 at 8:44 am
Save it as .sqlplan (right click to save) and below the post editor, there's an attachments option.
October 11, 2013 at 5:52 pm
Could you post some sample data in consumable format(Insert statements or a CTE)? That would help us to know what would be the best option.
October 10, 2013 at 1:42 pm
Do you only have those characters at the end of your string? you could simply use REPLACE or if you just want to eliminate the last ones, there's a more...
October 10, 2013 at 12:50 pm
I don't believe that there's a performance difference. However, I'm not sure why would anyone use so many gotos, seems like spaghetti code for me.
October 10, 2013 at 11:51 am
dwain.c (10/9/2013)
Luis Cazares (10/9/2013)
SELECT...
October 10, 2013 at 9:53 am
jshahan (10/9/2013)
Thanks for the responses and they both tell me “what”. I am after the “why”.
Let me quote myself.
because JOINs don't support correlated subqueries.
And to quote Nevyn
And second, you...
October 9, 2013 at 10:02 am
That's because JOINs don't support correlated subqueries. Change the INNER JOIN for a CROSS APPLY. 😉
October 9, 2013 at 9:48 am
You need a Units table or at least a Units set to look for all units. after that the rest is easy, just add a RIGHT JOIN.
SELECT
count(fr.[Unit]) as Actual,
fr.unit,
[1st_of_month],
last_of_month
FROM...
October 9, 2013 at 9:14 am
Abu Dina (10/9/2013)
Use Jeff's string splitter function?
Jeff's string splitter uses CTEs, but that would have been my first suggestion.:-)
October 9, 2013 at 9:04 am
Why do you want to limit the methods? You might be losing performance over strange requirements.
You could use CLR, but I'm not sure if that counts as a loop for...
October 9, 2013 at 8:41 am
Have you tried the TRY..CATCH to handle errors?
http://technet.microsoft.com/en-us/library/ms175976(v=sql.105).aspx
October 8, 2013 at 9:52 pm
It would be great to at least cover the basics.
It seems important to be prepared if MS ever discontinues the extended procedures.
October 8, 2013 at 3:57 pm
There might be something weird. Maybe the collation used or the way you expect your results.
This returns 'False' for me with the following collation SQL_Latin1_General_CP1_CI_AS
IF 'alphabet' > 'ax'
SELECT 'True'
ELSE
SELECT 'False'
What...
October 8, 2013 at 10:45 am
Viewing 15 posts - 7,606 through 7,620 (of 8,731 total)