Viewing 15 posts - 616 through 630 (of 5,502 total)
Your query should return only one row per AP_Ex.Student_ID only when all other values except AP_Ex.Ap_Expt_Date are equal.
Check the column values per AP_Ex.Student_ID. At least one more column will show...
February 13, 2012 at 12:55 pm
Here's a solution using a on-the-fly calendar table and the CrossTab method.
If you need this solution as a "sliding window" I still recommend to use the CrossTab article referenced in...
February 12, 2012 at 1:46 pm
You might want to ask this in an Oracle forum.
This is mainly a MS SQL Server site.
IIRC, http://asktom.oracle.com is a good resource.
February 12, 2012 at 12:01 pm
Joe, can you please clarify how the check constraint
CHECK (week_date LIKE '[12][0-9][0-9][0-9]-W[0-5][0-9]-[1-7]'),
would ever work on the data type specified (week_date CHAR(1)) ?
I expect that's just a typo and is...
February 12, 2012 at 10:13 am
J Livingston SQL (2/12/2012)
..."catch a man a fish and you can sell it to him"
"teach a man to fish and you have lost a business opportunity"
ROFL!!
That's just great!
Just another example...
February 12, 2012 at 7:44 am
Digs (2/11/2012)
Sir, I am an old fart working on a private project...just needed a little help !Thanks 🙂
"A little help" in the meaning of "Give me some fish" or "I...
February 12, 2012 at 2:29 am
Are you looking for something along those lines?
;
WITH cte AS
(
SELECT
wd.*,
ww.WrkWk_Duration,
ROW_NUMBER() OVER(PARTITION BY WrkWk_Key ORDER BY WrkWkDtl_Business_Date ) row
FROM WorkWeek_Details wd
INNER JOIN WorkWeek ww ON wd.WrkWkDtl_Key=ww.WrkWk_Key
)
SELECT
*,
CASE
WHEN (WrkWk_Duration...
February 11, 2012 at 5:07 pm
Digs (2/11/2012)
Thanks, but that stuff hurts my head...:w00t:Any one else wishing help out much appreciated...
Hmmm....
Let's assume you'll get a coded version. How will you actually use it?
Would you just put...
February 11, 2012 at 4:49 pm
To get all the month in the time range you need a calendar table (either a permanent or on-the-fly).
For the Pivot I'd use the DynamicCrossTab approach as described in the...
February 11, 2012 at 3:13 pm
pharmboy4u (2/11/2012)
Sorry I'm not posting in a table form, I don't create them so I'm not fluent in the lingo and it would take me forever (I am a SQL...
February 11, 2012 at 6:06 am
Is the WHERE clause only based on the identity column only?
What does the WHERE clause look like?
February 11, 2012 at 5:54 am
Why do you want to write it differently?
The way it is right now is one valid approach to tackle "catch-all-queries"[/url].
It might be an option to move the "common query" into...
February 11, 2012 at 5:49 am
Would the UNION approach help?
WITH cte AS
(
SELECT AU, GL ,GL1, [MONTH], PERIOD
FROM VELLS
UNION ALL
SELECT AU, GL ,GL1, [MONTH], PERIOD
FROM VELLS2
UNION ALL
SELECT AU, GL ,GL1, [MONTH], PERIOD
FROM VELLS3
)
SELECT AU, SUM(GL) as...
February 11, 2012 at 3:43 am
shahgols (2/10/2012)
You got great points Rob, thanks for that!And thanks for your response Burninator. Are you guys allowed to use USB or connect your cell phones to your PCs?
USB...
February 11, 2012 at 2:34 am
Here's a slightly different approach using a in-line table-valued function (itvf).
I don't know if it will even compile since I have nothing to test against (your sample data require a...
February 10, 2012 at 11:07 am
Viewing 15 posts - 616 through 630 (of 5,502 total)