Viewing 15 posts - 9,091 through 9,105 (of 15,381 total)
I don't remember all of the syntax off the top of my head and I haven't used this in several years. I will do my best but google will likely...
March 13, 2013 at 10:23 am
a_ud (3/13/2013)
I'm got a system made out of: Access front-end + SQL Server back-end (typical).
I need to call from Access VBA a function in SQL Server, but I...
March 13, 2013 at 8:46 am
Here is your query after running it through a formatter.
SELECT *
FROM (
SELECT users.last_name + ',' + users.first_name AS [User ID]
,workflow_regions.NAME AS Region
,queues.NAME AS [Queue]
,work_item_statuses.NAME AS [Status]
,CASE
WHEN convert(VARCHAR, work_items.creation_date, 110)...
March 13, 2013 at 8:30 am
You will have to suffer with performance issues because of the inability to properly use execution plans with this type of thing unless you can use the dynamic sql approach...
March 13, 2013 at 8:10 am
RVO (3/13/2013)
Gail's blog recommends using dynamic SQL
but our boss doesn't like it at all.
I have to learn how to handle it either with CASE
or IF. My...
March 13, 2013 at 8:01 am
It is a little hard to figure out what you are trying to do here but can you just a new column to your 2 queries? One would be 'YTD...
March 13, 2013 at 7:55 am
You need an aggregate function, specifically SUM in this case.
March 13, 2013 at 7:21 am
bugg (3/13/2013)
I meant to say without using a tally table and using loop instead.
:w00t: A set based query will out perform a loop any day. We spend a lot of...
March 13, 2013 at 7:14 am
robertd 77391 (3/12/2013)
A simple way to do this:
update #Table1
set #Table1.SID = #Table2.aID
from #Table2
where #Table1.Sno = #Table2.Sno ;
I can't for the life me remember the details but there is an issue...
March 12, 2013 at 3:29 pm
This is a type of catch-all query. Gail's blog has a great way of handling this type of thing.
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/%5B/url%5D
March 12, 2013 at 2:57 pm
Lynn Pettis (3/12/2013)
Sean Lange (3/12/2013)
March 12, 2013 at 2:53 pm
You have enough points that I can assume you are not around here. Please post ddl, sample data and desired output. I suspect you want a cross tab. You can...
March 12, 2013 at 1:26 pm
All user uses the same user sa and password.
You REALLY need to not use the sa account for people or applications. Create logins for your different people and applications so...
March 12, 2013 at 8:17 am
A little late to the party but just wanted to share my 2¢. You should leave the formatting to the front end. Have your queries return a datetime datatype and...
March 12, 2013 at 8:08 am
Viewing 15 posts - 9,091 through 9,105 (of 15,381 total)