Viewing 15 posts - 16 through 30 (of 62 total)
My first interactions with Access were all negative. My first DBA job I fell into on accident. It was such a pain we had users with linked tables...
July 17, 2014 at 8:37 am
SELECT
oh.*, o.UnitPrice
FROM Sales.SalesOrderHeader oh
OUTER APPLY (Select top 1 od.unitPrice from Sales.SalesOrderDetail od where od.SalesOrderID=oh.SalesOrderID order by od.unitPrice) as o
I did not test this, but believe that it...
July 7, 2014 at 3:34 pm
SQLRNNR (7/1/2014)
Nice first article Sarah (at least here on SSC). If you have others, please let us know where to find them.
This was my first article. Hopefully not...
July 1, 2014 at 2:38 pm
Skip maintenance plans for index rebuilds. Use this http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html.
June 30, 2014 at 3:16 pm
First you don't need the quotes for your in, because year returns data type of int. (http://msdn.microsoft.com/en-us/library/ms186313.aspx) Using functions is not recommended in the where clause you...
June 27, 2014 at 11:26 am
Some people are just motivated to do a good job and others need motivation. An interesting article was on MSN kind of related to this, but in the opposite...
June 24, 2014 at 1:36 pm
I have been attending user groups on and off for years... Where is the beer?
June 19, 2014 at 8:20 am
SELECT *
FROM appt_exch where appointment_sk in
(select top (1) appointment_sk FROM appointments where appoint_type_sk=
(SELECT ITEM_SK FROM GROUP_ITEMS WHERE GROUP_CODE = 'APPTTY' AND DESCRIPTION = 'TRIAL')
and begin_time between '01/01/2014' and '05/31/2014'
ORDER BY...
June 13, 2014 at 2:30 pm
Maybe I missed the boat, but is there a reason you aren't using a simple charindex?
select charindex(' ', field) returns where the first space is located, you can use that...
June 12, 2014 at 9:33 am
The joke is that you are always promoted one level beyond your competency. I have had some great managers, some awful managers and some in-between. Bad managers are...
May 7, 2014 at 3:32 pm
Try this...
SELECTpd.year,
pd.period,
pd.startdate,
df.projectnumber,
df.startdate_contract,
df.enddate_contract,
MONTH(df.startdate_contract) AS month
FROMperdat pd (NOLOCK)
LEFT OUTER JOIN ProjectDateFields df (NOLOCK) ON df.startdate_contract BETWEEN pd.startdate AND pd.enddate
and df.projectnumber = 'CR1003753'
April 4, 2014 at 9:10 am
As soon as you added df to where clause it became an inner join.
April 4, 2014 at 9:08 am
Viewing 15 posts - 16 through 30 (of 62 total)