Viewing 15 posts - 16 through 30 (of 2,640 total)
Use CHARINDEX() to find the position of the open/close parens, and then use SUBSTRING() to get the parts between them, and REPLACE() to swap that with an empty string?
October 4, 2019 at 12:09 am
is there an easy way to identify those?
October 3, 2019 at 7:18 pm
Live and learn, I guess.
I might have to revisit this and rewrite it when I learn how to do it better. I think part of the challenge is that it's...
September 30, 2019 at 6:06 pm
The part I finally figured out that threw me at first is that you filter what the CTE returns by adding a WHERE clause outside the CTE (seems to painfully...
September 30, 2019 at 4:16 pm
FWIW, here's my current code... I *think* it works, but maybe it's just AdventureWorks playing tricks on me.
CREATE PROC PartsSheetForSalesOrder @SalesOrderID INTASWITH Parts(AssemblyID, ComponentID, PerAssemblyQty, EndDate, ComponentLevel) AS ...
September 30, 2019 at 5:53 am
Here's my code so far... How do I just return the lowest level components? I feel like I'm missing a join or something somewhere...
Here's my code so...
September 29, 2019 at 5:21 pm
If I sequence the Work Orders somehow, I could use one of those dreaded cursor things... then I could do something like this:
September 25, 2019 at 10:23 pm
DELETE FROM TableAWHERE EXISTS (SELECT 1 FROM TableB WHERE TableB.DeleteDate = TableA.RecDate);
I guess I should have asked what you tried.
September 24, 2019 at 6:20 pm
This is a "note to self", I guess, so...
this is as far as I have gotten. it's not quite right maybe, because I have yet to figure out how to...
September 24, 2019 at 6:11 am
I think you're making this harder than it really is. What specifically are you trying to learn? What kind of SQL questions are you trying to answer that you don't...
September 24, 2019 at 3:59 am
I would do the stairways in order. They're ordered in increasing complexity, generally.
Or are you asking how to order the stairways?
What are you trying to learn?
September 24, 2019 at 3:38 am
Why not take them in order? (Or am I missing something?)
September 24, 2019 at 3:23 am
Could you explain in words what you're trying to do? What's your expected output?
September 24, 2019 at 1:20 am
I have a question about the rCTE example. In the rCTE, the Product Assembly is "decomposed" into parts, which is then decomposed again (in the rCTE)… but how do you...
September 23, 2019 at 5:47 pm
Do you have some sample data?
CREATE TABLE scripts, INSERT scripts, please.
September 20, 2019 at 11:04 pm