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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:32:05+00:00 2026-05-20T04:32:05+00:00

I was walking view definitions in a database today using sqlalchemy 0.6 (using get_view_definition())

  • 0

I was walking view definitions in a database today using sqlalchemy 0.6 (using get_view_definition()) and I ran across one that was larger than 4000 characters. MS seems to say (Information Schema Views for VIEWs) that shouldn’t be returned. MS SQL Server Management Studio shows the whole thing (well at least the beginning and the end look right) if you ask for the design of the view. sqlalchemy returns a string truncated at 4000 characters (boo, hiss). How can I ask the database what type it wants to return for this piece of data instead of depending on what I suspect is out of date documentation. I’m assuming the type is probably varchar. I would just like to verify that.

  • 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-20T04:32:06+00:00Added an answer on May 20, 2026 at 4:32 am

    The object definitions, including view definitions, can be retrieved from the sys.sql_modules view, or using the OBJECT_DEFINITION function. This includes the proper NVARCHAR(MAX) type that contains the untruncated definition of the object.

    Other backward compatibility views like sys.syscomments or INFORMATION_SCHEMA.VIEWS contain a column of type NVARCHAR(4000) and such a type, by definition, must truncate the object definition after first 4k characters. Many cross platform tools will rely on the INFORMATION_SCHEMA views and perhaps sqlalchemy does the same.

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

Sidebar

Related Questions

I have 2 procedures. One that builds a temp table and another (or several
Today I was walking at the MSDN Forums and I see two very strange
I am walking through a xml definition file and I have a DOMNodeList that
I am walking through the MS Press Windows Workflow Step-by-Step book and in chapter
Is it possible to emulate a device sleeping and waking using the Microsoft-supplied device
Do you know how can I convert a google walking directions JSON response to
While testing I started walking through authorizing my test machine (192.168.15.6, a local IP)
I've spent too much time walking down dead ends on this project, so it's
I was walking through the new html 5 features and I saw and tried
I'm diving into ASP.NET MVC 2 and I'm walking through a tutorial and I'm

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.