Viewing 15 posts - 646 through 660 (of 1,957 total)
you are welcome:-D
November 18, 2013 at 6:15 pm
I would suggest you start by learning about VIEWS here : CREATE VIEW (Transact-SQL)
Then do something like this:
create view viewJatin
AS
with xmlnamespaces ( 'http://www.w3.org/2001/XMLSchema-instance' as xsi, default 'http://www.municipalsoftware.com/AppSpec')
select nd.value('@name','char(5)') as...
November 18, 2013 at 5:50 pm
Yes, that is why I said "Just replace the handling of the variable @properties with your table column"....
You haven't provided any scripts for table creation or sample data, so I...
November 18, 2013 at 5:33 pm
declare @properties varchar(max)='<?xml version="1.0" encoding="utf-16"?>
<ResourceGroupSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0" availableTimeSubject="" xmlns="http://www.municipalsoftware.com/AppSpec">
<IsNew>false</IsNew>
<AlternateGroups />
<Members>
<Member name="CDEAP" priority="1" />
<Member name="CDSUP" priority="1" />
<Member name="PWCAK" priority="1" />
<Member name="PWGIS" priority="1" />
<Member name="PWLAB" priority="1" />
<Member name="PWMXP" priority="1" />
</Members>
<UserNames />
</ResourceGroupSpec>';
with xmlnamespaces...
November 18, 2013 at 5:21 pm
The use of the word "DBNull" suggests that this is an error on the .NET side, not in SQL Server.
Debug the code in visual studio with break on "Common Language...
November 18, 2013 at 5:08 pm
Where did you put that sort? On the column group? It needs to be on the column group...
November 18, 2013 at 5:03 pm
I forgot to mention, the WHILE loop / *Identity Hack* version takes about the same time as your sample script for the 57596 result, and about 3 times that (30...
November 17, 2013 at 6:05 pm
Hi Tom,
A generic cte is possible, but I want to show you my WHILE loop first because it can handle the data and my CTE can't!
/* Combinations of coins -...
November 17, 2013 at 6:00 pm
Generally speaking, in most programming languages it is a bad idea to "loop" through a data set that you are updating.
I could imagine that in this case you could have...
November 17, 2013 at 12:33 pm
if you are not happy to just not save the report, then why not copy it first, then play with the copy?
November 17, 2013 at 12:19 pm
and another...
select customer_name
from order table
group by customer_name
having max(order_date) > max(ship_date)
November 16, 2013 at 4:52 pm
Nothing like that for SQL Server, so it depends whether you want to export ad-hoc query results or you want to schedule the extract?
For ad-hoc export to Excel, I would...
November 16, 2013 at 10:45 am
I would suggest something much simpler and probably quicker:
With mySampleData(id,UserName)
AS
(SELECT 1,'James' UNION ALL
SELECT 2,'John' UNION ALL
SELECT 3,'Bob' UNION ALL
SELECT 4,'Kate' UNION ALL
SELECT 5,'Julie'...
November 15, 2013 at 4:56 pm
The alternative for DateInterval.Second is simply the string "s"
=DateAdd("s",-1, DateSerial(Year(Today)+1,1,1))
November 15, 2013 at 4:40 pm
Try this (notice I also changed the namespace declaration to use a default instead so you don't need to prefix things with "ns:")
;with xmlnamespaces ( default 'http://www.xyz.com')
SELECT
...
November 15, 2013 at 7:14 am
Viewing 15 posts - 646 through 660 (of 1,957 total)