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

  • Home
  • SEARCH
  • 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 9189945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:20:58+00:00 2026-06-17T20:20:58+00:00

I am using this procedure to create a GUID number when reading a table.

  • 0

I am using this procedure to create a GUID number when reading a table.

The stored procedure works correctly, but displays only two column, id and EventId.

I need to display all the other columns of dbo.ASFC_App_Timetable beyond id and EventId.

Other columns are EventTitle and EventNote for example.

Are you able to provide me a sample of code for solving this issue?

 CREATE PROCEDURE SPROCGetAllEventsForStudent
    AS
    BEGIN
        SELECT convert(uniqueidentifier,
               stuff('62799568-6EF2-4C95-84E7-4953A6959C99',1,len(rn),convert(varchar,rn))) id,
               T.EventId
        FROM ( 
          select x.EventId,  ROW_NUMBER() over (order by x.EventId) rn
          FROM dbo.ASFC_App_Timetable as x ) T
    END

At the moment is displays.. I need to display the other columns, too:

22799568-6EF2-4C95-84E7-4953A6959C99    AB-TT-E1-2/TU12
32799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
42799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
52799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
62799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
72799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
82799568-6EF2-4C95-84E7-4953A6959C99    PU-A2-2 -Z/CL12
  • 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-06-17T20:20:59+00:00Added an answer on June 17, 2026 at 8:20 pm

    why can’t you add the other columns in the subquery?

    SELECT convert(uniqueidentifier,
           stuff('62799568-6EF2-4C95-84E7-4953A6959C99',1,len(rn),convert(varchar,rn))) id,
           T.EventId, 
           T.EventTitle , 
           T.EventNote
    FROM 
        ( 
            select  x.EventId, 
                    x.EventTitle , 
                    x.EventNote, 
                    ROW_NUMBER() over (order by x.EventId) rn
            FROM    dbo.ASFC_App_Timetable as x 
        ) T
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure that updates a table using linq, eg: (this is
I have this stored procedure which I am using to populate a user table.
I want to create a new object using this $procedure = new ${$s.'\\'.$p}; It
Suppose I'm using the following Oracle code in a stored procedure: CREATE GLOBAL TEMPORARY
I am using SQL Server 2008 Enterprise. I am wondering whether this stored procedure
Using mysql to write procedure. but am getting error when i call this procedure
hi i m using this stored procedure DELIMITER $$ DROP PROCEDURE IF EXISTS get_all_user_selected_children_of_preference$$
I have this stored procedure CREATE PROCEDURE [dbo].[TestProcedure] @param1 int = 0 ,@param2 int
I want to execute stored procedure with one parameter that returns table using EF4
I use this code to define my stored procedure CREATE PROCEDURE [dbo].[SP] (@Country NVARCHAR(20))

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.