Forum Replies Created

Viewing 15 posts - 646 through 660 (of 1,957 total)

  • RE: Need to parse values from XML type into SQL View

    you are welcome:-D

  • RE: Need to parse values from XML type into SQL View

    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...

  • RE: Need to parse values from XML type into SQL View

    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...

  • RE: Need to parse values from XML type into SQL View

    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...

  • RE: Getting an error when attempting to insert a record into a table.

    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...

  • RE: SSRS matrix group by error

    Where did you put that sort? On the column group? It needs to be on the column group...

  • RE: Coin combinations

    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...

  • RE: Coin combinations

    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 -...

  • RE: Cursor fetch loops endlessly

    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...

  • RE: Preview report without savings

    if you are not happy to just not save the report, then why not copy it first, then play with the copy?

  • RE: Can I compare two max values in sql table?

    and another...

    select customer_name

    from order table

    group by customer_name

    having max(order_date) > max(ship_date)

  • RE: Output a query as an Excel file

    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...

  • RE: Function to list passenger names?

    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'...

  • RE: How to to add a default date time parameter for my SSRS parameter?

    The alternative for DateInterval.Second is simply the string "s"

    =DateAdd("s",-1, DateSerial(Year(Today)+1,1,1))

  • RE: XML Parsing Issue

    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

    ...

Viewing 15 posts - 646 through 660 (of 1,957 total)