Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3596558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:00:13+00:00 2026-05-18T20:00:13+00:00

The following query is something i inherited from an old app that adds 2

  • 0

The following query is something i inherited from an old app that adds 2 attributes to an excel stored in the database.

SELECT 
   row_number() over(order by id) as num
   , [id] as mailsort
   , 0 as pages
   , [xmlRecord].query('/sst-statement/*') 
FROM  dbo.RPA200_preproc AS [sst-statement] 
WHERE rpatype = 201 
ORDER BY id for xml auto

returns an XML starting with

<sst-statement num="1" mailsort="32" pages="0">

now, the SQL would need to be translated to a LINQ statement. Is that possible similar to this query or would it be better to retrieve the XML from database and then change the XML?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:00:14+00:00Added an answer on May 18, 2026 at 8:00 pm
    SELECT
    row_number() over(order by id) as num,
    [id] as mailsort,
    0 as pages,
    [xmlRecord].query('/sst-statement/*')
    FROM  dbo.RPA200_preproc as [sst-statement]
    where rpatype = 201
    order by id for xml auto
    

    turned into

    int i=0;
    var Query =
    FROM I in dbo.RPA200_preproc
    WHERE rpatype = 201
    order by id
    SELECT I.id;
    foreach(var Item in Query)
    {
        new XElement("sst-statement", new XAttribute("num", i), new XAttribute("mailsort" = Item), new XAttribute("Pages",(int)0));
        i++;
    }
    

    I think 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following query is something i inherited from an old app that adds 2
I have a query something like the following: select sum(t1.qty) t1Total, sum(t2.qty) t2Total, sum(t1.qty
The following query: select unnest(Table2.L) as X, unnest(Table1.O) from Table1, Table2 where Table1.code =
The following query: SELECT DISTINCT ClassName FROM SiteTree ORDER BY ClassName is returning things
The following query is not working the way I expect: SELECT DISTINCT * FROM
I have the following query: select col1, sum( col2 ), count( col3 ) from
I have the following query: SELECT * FROM my_users as U RIGHT JOIN subscribers
I have the following query SELECT s.s_id, s.t_id, c.c_id, c.desc, sm.user_id FROM s s
I used the following query to find duplicates: SELECT userID, COUNT(userID) AS NumOccurrences FROM
I have the following query that works when the Lookup table has something in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.