Viewing 15 posts - 12,136 through 12,150 (of 15,381 total)
Entity Framework can also use stored procs. Keep your sql close at hand and don't let EF take over. It has gotten a lot better in the last couple versions...
May 2, 2012 at 8:41 am
This is one of the challenges of recursion and the adjacency list. How can you know if there is an endless loop until you get into it? You could put...
May 2, 2012 at 8:37 am
The best thing you can do is to continue to use stored procedures. That way you continue to have 100% control over the sql that is being executed on your...
May 2, 2012 at 8:28 am
Change the = to IN?
UPDATE Family1 SET Children = 3
WHERE Name IN (SELECT Name FROM v_dependance WHERE dependOf IS NULL)
May 1, 2012 at 7:20 pm
Are you talking about opening a transaction and keeping it open on your production server?
Do you have a different code base for these users so they can view this data?
What...
May 1, 2012 at 3:43 pm
Searching this can be of difficult if you don't know what you are looking for, which I suspect you probably a bit uncertain. Here is the BOL link for the...
May 1, 2012 at 1:28 pm
You are quite welcome. Take a look at BOL here.
You can also take a look at this thread about ways to avoid calling the same function repeatedly.
Finally you should...
May 1, 2012 at 12:37 pm
Something like this should do the trick.
;with FamilyTree(ParentName, ChildName) as
(
select 'Erick', 'patricia' union all
select 'Michael', 'leonie' union all
select 'Erick', 'Anne' union all
select 'Stephane', 'Sabine' union all
select 'Stephane', 'emilie'
)
select ParentName,...
May 1, 2012 at 12:26 pm
oooohhhhh......somehow I missed the details of what you were saying. This is rather challenging. The book that opc linked above is considered a great book on the topic (the link...
May 1, 2012 at 12:16 pm
Jeremy... (5/1/2012)
Thanks. you've been a huge help. Right before you replied, I actually went back through and and put the entire case statements in the where clause. ...
May 1, 2012 at 10:39 am
You can't reference your derived column like that. You have to use the whole case statement again.
Here is a really basic example.
select case when 1 = 2 then 'NO' else...
May 1, 2012 at 10:24 am
It can easily handle more than one root. You would just have more than 1 row where "ParentID" is null. What challenges are you running into? Jeff Moden calls this...
May 1, 2012 at 10:13 am
Something like this?
SELECTdbo.BookingTransaction.BookingRef
, x.MaxDescription
, dbo.Bookings.CancelledDate
, dbo.BookedFlightLegs.DepDate
, dbo.BookedFlightLegs.AirlineCode
, dbo.BookedFlightLegs.FlightNumber
, dbo.BookedFlightLegs.DepAirportID
, dbo.BookedFlightLegs.ArrAirportID
, dbo.BookedFlightLegs.ArrDate
, dbo.BookedExtrasList.SupplierCode
FROM dbo.BookedExtrasList INNER JOIN
dbo.BookingTransaction WITH (NOLOCK) ON dbo.BookedExtrasList.BookingTransactionID = dbo.BookingTransaction.BookingTransactionID INNER...
May 1, 2012 at 10:11 am
Viewing 15 posts - 12,136 through 12,150 (of 15,381 total)