Viewing 15 posts - 2,746 through 2,760 (of 3,482 total)
I'm getting closer...
try something like this:
SELECT phone
, FixPhone
, LEFT(FixPhone,1) + '-(' + SUBSTRING(FixPhone,2,3) + ') ' + SUBSTRING(FixPhone,5,3) + '-' + SUBSTRING(FixPhone,8,4)
FROM (
SELECT phone
, CASE WHEN LEFT(phone,1)='1' THEN REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(phone,'(','.'),')','.'),'.',''),'-',''),' ','')
ELSE...
December 7, 2014 at 7:13 pm
Maybe this article will help get you sorted out
December 7, 2014 at 12:41 pm
First things first - we need to understand what you really mean by this:
I want email sent with the above data in html table format and only if col3 values...
December 6, 2014 at 6:53 pm
December 5, 2014 at 5:51 pm
Kevin,
This design worries me. Can you please describe the business problem you're trying to solve? I would be willing to wager that what you're trying to do would...
December 3, 2014 at 11:17 pm
For a minute I thought my post disappeared... then I realized you were double-posting. While I realize that you may feel that double-posting gets you...
December 3, 2014 at 10:53 pm
I'm pretty sure Eirikur will shred my SQL, but this works:
SELECT MatchID
, MatchDate
, TeamID
, PrevMatch
, DaysElapsed
FROM (
-- get the difference in days between matches
SELECT MatchID
, MatchDate
, TeamID
, LAG(MatchDate,1) OVER (PARTITION...
December 3, 2014 at 8:25 pm
The really short answer is to use a tablix with two columns (StartOfWeek, WorkHours) inside of a matrix with a ColumnGroup on MonthNumber.
Which means you need to add a calculated...
December 3, 2014 at 4:30 pm
Why not create a UNIQUE constraint on the table and disallow the duplicates that way?
December 2, 2014 at 11:59 pm
I may just spend some AmazonBucks on them. Ferrari's book looks really good. Might have to find some tutorials on MDX too, but one thing at a time.
Thanks...
December 1, 2014 at 3:16 pm
Your English is fine! (the sample data is a huge help!)
Here's the sample data in a useable format:
SELECT 49 AS WeekNo, 28...
December 1, 2014 at 12:24 pm
Sorry, can't remember if any windowing functions were available in 2008R2. Haven't used 2008 in an age (partly because windowing functions are super handy!)
November 29, 2014 at 11:08 am
I would probably bring all the data down into Access and index the tables -- after you have all the data. Then build your query there. When you're...
November 29, 2014 at 7:38 am
One option is to do this with a windowing function, like this:
SELECT ProductID
, Sales
, SUM(Sales) OVER (ORDER BY Sales
ROWS BETWEEN UNBOUNDED PRECEDING
AND CURRENT ROW) AS RunningTotal
FROM (SELECT 1 AS ProductID,...
November 29, 2014 at 7:28 am
Exercise your GoogleFu... There are examples all over the place, especially on the MS website...
http://msdn.microsoft.com/en-us/library/ms190307.aspx
See example B.
November 28, 2014 at 7:20 pm
Viewing 15 posts - 2,746 through 2,760 (of 3,482 total)