Viewing 15 posts - 181 through 195 (of 3,957 total)
This will produce a 5x5 square of 5, 5-letter words that read the same across as down.
WITH UNIQUEnTuples (n, Tuples) AS
(
SELECT 1, CAST(strcol AS VARCHAR(max))
...
March 31, 2015 at 7:40 pm
standardbluecaboose (3/27/2015)
This comes up while Googling so I will resurrect it from the grave.
Hope that's not a pun with Easter being nearly upon us.
standardbluecaboose (3/27/2015)
s o b a
o l l...
March 31, 2015 at 7:08 pm
CELKO (3/31/2015)
Abend? Jeez, now there's a word I haven't heard since I was using IBM 360 JCL!
LOL! Remember the quote: "OS/JCL makes sense after you have studied it...
March 31, 2015 at 6:52 pm
pietlinden (3/31/2015)
Check out this article by Dwain Camps...
You beat me to it.
I would have gone with the CROSS APPLY TOP method as this is SQL 2008 instead of the self-JOIN.
March 31, 2015 at 6:45 pm
Phil Parkin (3/31/2015)
See the first link in my...
March 31, 2015 at 6:34 pm
Not 100% sure I understand what you are trying to do, but I'm assuming your orders always have either one line or two.
Not one of the cleverest solutions I've ever...
March 31, 2015 at 6:21 pm
sql-lover (3/31/2015)
Luis Cazares (3/31/2015)
I'm leaving both options. Note that the join needs to calculate all the values before joining and that's why...
March 31, 2015 at 5:59 pm
ScottPletcher (3/31/2015)
CELKO (3/31/2015)
use lowercase only for data type names in SQL Server
.
No. The human eye reads certain words as a single unit called a bouma. The keywords in...
March 31, 2015 at 5:55 pm
I see you have start and end dates on your relationships.
If you add a new row for an existing relationship, what are the rules regarding the dates?
How is the current...
March 31, 2015 at 5:50 pm
I believe that this is relational division with remainder:
March 30, 2015 at 7:25 pm
Perhaps like this?
WITH AllCombos AS
(
SELECT ID, KeyName, OrdNo
FROM #left_table
CROSS JOIN
(
...
March 30, 2015 at 7:08 pm
I'd have to go with something similar to Rafal here but no need for two GROUP BYs:
WITH SampleData AS
(
SELECT ItemID=1, ParentID=NULL, Name='Package A', QtyAvailable=10
...
March 30, 2015 at 6:49 pm
You can try this. Had to make some assumptions around Jeff's excellent questions.
declare @EmployeeStatus TABLE (
[EmployeeID] [int] NOT NULL,
[EmployeeStatus] [varchar](24) NOT NULL,
[EffectiveDate] [date] NOT NULL
)
INSERT INTO @EmployeeStatus VALUES (11,...
March 29, 2015 at 8:43 pm
Peter Heller (3/29/2015)
If you defined the EffectiveEndDT as DiscontinuedDT your queries would not have to use Isnull. It would be sargable and make the query...
March 29, 2015 at 6:35 pm
Divide and conquer is what I did in the deja vu link, so if Jeff's right (and he usually is), it might work better for you.
March 27, 2015 at 4:33 am
Viewing 15 posts - 181 through 195 (of 3,957 total)