Viewing 15 posts - 8,416 through 8,430 (of 15,381 total)
You could use a recursive cte for this.
btw, in your sample data you have no orphans because UnitID 631 is the first one there. 😉
May 8, 2013 at 2:23 pm
azdeji (5/8/2013)
INSERT INTO Wanted results (Participant_ID,supporter_id,event_code,Event_role,Lv2 child,Lv3 child) VALUES ('234221','98130','BALL05','NULL','Do not register','Did Not Attend');
INSERT INTO Wanted results (Participant_ID,supporter_id,event_code,Event_role,Lv2 child,Lv3 child) VALUES ('234222','98130','BCC07','NULL','No Reg','Did Not Attend');
INSERT...
May 8, 2013 at 2:17 pm
Great job posting ddl and sample data. What do you want as output?
May 8, 2013 at 1:00 pm
Or since your XML appears to not really be xml maybe you need to query this as text.
if OBJECT_ID('tempdb..#XMLish') is not null
drop table #XMLish
create table #XMLish
(
Messaging text
)
insert #XMLish
select '<?xml version="1.0"...
May 8, 2013 at 12:57 pm
dwilliscp (5/8/2013)
Lynn Pettis (5/8/2013)
dwilliscp (5/8/2013)
I have found one other strange thing..
The outer join has data in the columns for details_2, so I do not understand how in the heck it...
May 8, 2013 at 12:23 pm
It is nearly impossible to offer much assistance because we don't have any details to work with. At the very least we would need to see actual execution plan. ddl...
May 8, 2013 at 11:55 am
Eugene Elutin (5/8/2013)
elmoustabchir (5/8/2013)
for my first error , its a column like this : déc 5 2007 12:00AM ( i dont understand why it doesnt work because its...
May 8, 2013 at 10:33 am
Here is one way to do this without a cursor. It has the additional advantage of putting all the results into a single table instead of 1 table for each...
May 8, 2013 at 10:14 am
What are the results of these two queries?
select COUNT(*) FROM #Delivery Where cast(delivery as int) = 83535308
select COUNT(*) from details_2 where cast(details_2.Delivery_Doc as int) = 83535308
May 8, 2013 at 9:25 am
dwilliscp (5/8/2013)
Since the first table had one record with a delivery of 00835308 and the second had none, I would have expected the SQL to return one record. What I...
May 8, 2013 at 9:23 am
elmoustabchir (5/8/2013)
for my first error , its a column like this : déc 5 2007 12:00AM ( i dont understand why it doesnt work because its pretty simple...
May 8, 2013 at 9:18 am
prakashr.r7 (5/8/2013)
I have some rows where all the fields are very much similar to each other except ...
May 8, 2013 at 8:37 am
elmoustabchir (5/8/2013)
its my first topic hope i'll get a solution for my troubles
i have some stored procedure and every things its okay when i execute my SP except them...
May 8, 2013 at 8:17 am
Kbear (5/7/2013)
ABC\genn.smith.itemresults
with this statement
ALTER SCHEMA dbo TRANSFER ABC\genn.smith.itemresults
and I get this error:
Incorrect syntax near '\'.
What does...
May 7, 2013 at 3:21 pm
TryingToLearn (5/7/2013)
SELECT DATEADD(mm, DATEDIFF(mm, 0, CONVERT(DATETIME, '20121130', 112)), 0) MonthStart ) CM
ON calldate...
May 7, 2013 at 2:35 pm
Viewing 15 posts - 8,416 through 8,430 (of 15,381 total)