Viewing 15 posts - 1,681 through 1,695 (of 2,894 total)
I agree that Service Broker would allow you to call procs asynchronously from within a proc. However, personally, if I would have the same needs, I would do it from...
April 26, 2012 at 9:44 am
SUM(CASE WHEN Status = 'RG' THEN 1 ELSE 0 END) AS CountRGStatus
SUM(CASE WHEN Status = 'GS' THEN 1 ELSE 0 END) AS CountGSStatus
April 26, 2012 at 7:57 am
April 26, 2012 at 7:37 am
As I don't have a crystal ball or magic mirror, I cannot see what you are doing without you posting complete query and tables DDL. It doesn't matter how good...
April 26, 2012 at 7:36 am
kotharibij (4/26/2012)
Both my SQL and yours (very interesting SQL), gives the same result.
Day RegTotal
116
4121
532
636
737
836
933
1046
1145
I thought of a calendar table but...
April 26, 2012 at 6:18 am
Which input parameter you want to use to define the order? Which column should it apply to?
You can do something like:
ORDER BY (CASE WHEN SomeColumn = @HigherPriorityValue THEN 1...
April 26, 2012 at 5:29 am
Without knowing what your tables are and what your full query is, the maximum what I can come up with:
SELECT t.ApprovalID
,u.UserName ...
April 26, 2012 at 5:25 am
Then tell your customer he cannot have the "google-style" search as their IT prohibits it.
April 26, 2012 at 5:16 am
select replace(left(val, charindex('^',val)),'^','') as LeftPart
,replace(substring(val, charindex('^',val), len(val)),'^','') as RightPart
from...
April 26, 2012 at 5:00 am
...
Unfortunately, Full Text Search is not an option - for some weird reason, it's not allowed in our corporate servers. Neither dynamic sql.
...
The closest to "google-style" search in SQL is...
April 26, 2012 at 4:50 am
The best option is to create and use CalendarTable, but you can do it by:
select convert(integer,DATENAME(day,m.MonthDay)) as Day, count(*) as RegTotal
from (SELECT DATEADD(DAY,ROW_NUMBER() OVER (ORDER BY (SELECT NULL))-1,'20120401') as MonthDay
...
April 26, 2012 at 4:02 am
vinu512 (4/26/2012)
Thanks Eugene.As simple it may be....but that was what I was looking for. 😎
The key in using CURSORS (or loops, which are no much difference to cursors), as in...
April 26, 2012 at 3:36 am
Viewing 15 posts - 1,681 through 1,695 (of 2,894 total)