set @SQL= SELECT @DP= Y.times.query('DateDispatched').value('.', 'varchar(19)'), @ER=Y.times.query('DateEnroute').value('.', 'varchar(19)') FROM ( SELECT CAST(y AS XML) FROM OPENROWSET( BULK @FILENAME, SINGLE_BLOB) AS T(y) ) AS T(y) CROSS APPLY y.nodes('/PCRDATA/Times') AS Y(Times) if exists(select* from [dbo].[MICU] where PRID=@PRID) UPDATE [dbo].[MICU] SET dbo.MICU.Dispatched= @DP,dbo.MICU.Enroute= @er where dbo.MICU.PRID=@PRID ELSE INSERT INTO [dbo].[MICU] (PRID,Dispatched,Enroute) values(@PRID,@DP,@er)
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
Connect with Certified Experts to gain insight and support on specific technology challenges including: