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 7728857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:49:26+00:00 2026-06-01T05:49:26+00:00

Here is a behavior I only came to learn of by mistake. A table

  • 0

Here is a behavior I only came to learn of by mistake. A table in SQL Server has a UNIQUEIDENTIFIER column and I ran a query like:

SELECT * FROM Tbl WHERE GuidColumn = N'2B375CD8-D210-463F-A2FD-EAFB0D643664#1'

The #1 at the end of the Guid got there by mistake as I had copy-pasted it from a url that was appending #1, #2, #3, and so on representing paging.

What surprised me is that the query ran just fine and I got the same result as I would get by running:

SELECT * FROM Tbl WHERE GuidColumn = N'2B375CD8-D210-463F-A2FD-EAFB0D643664'

Would anyone know how the # and anything after is intepreted in such a scenario?

  • 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-01T05:49:27+00:00Added an answer on June 1, 2026 at 5:49 am

    This is dealt with explicitly on MSDN: http://msdn.microsoft.com/en-us/library/ms187942.aspx

    It doesn’t mean anything – SQL server only reads the first 36 characters of the string when converting to Guid.

    Clarification

    Following John Gathogo’s comment about the '{GUID}[gibberish]' case (and after acceptance), I think I can expand the rule slightly.

    1) If that string starts with '{', then the 38th MUST be '}' (try even leading and trailing spaces within – it won’t work), otherwise conversion fails. Then the 36 characters within are converted.

    2) Otherwise, the first 36 characters are used.

    So you can add :), << and antidisestablishmentarianism – after the 38th character in 1) or the 36th in 2), it makes no difference.

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

Sidebar

Related Questions

I'm getting some fairly odd behavior here... I noticed that only localhost, a header
I've implemented the attached command behavior pattern found here and it works well to
I am using jQuery Accordion here and find some strange behavior when opening a
I have a very strange behavior with Request.Form . Here are two IIS 7
I'm experiencing some strange behavior for which I can't find any documented knowledge. Here's
I've run into some behavior from Python 2.6.1 that I didn't expect. Here is
I got strange behavior when I tried to test my navigator.geolocation.getCurrentPosition web page. Here
Here is a summary of the behavior: while loop iterates to the end of
Please see my script here: LIVE EXAMPLE There is a unintelligible behavior which I
I'm stumped by some of the behavior of the Select-Object cmdlet. Here is an

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.