Re: How to find the maximum possible value of a given datatype



One alternative is to write your own function that encapsulates the
hardcode. Pass the table and column names, query the system tables
for the type and related information such as max length of a varchar,
and then return it. Clumsy, no doubt.

My apologies, it is nowhere near as simple as I described as, at a
minimum, one function for each datatype group (dates, character
strings, etc) would be required.

Roy Harvey
Beacon Falls, CT
.



Relevant Pages

  • Re: Linking tables in Access
    ... > If you use a database engine that supports triggers, ... a query that returns records with certain criteria. ... If you need to have the fields presented with related information from ... Armen Stein ...
    (microsoft.public.access.tablesdbdesign)
  • Complicated query
    ... QTopic [varchar 50] ... Term [int] - Validity in months from the current date. ... The problems are to write a query to get the question list for a patient ...
    (microsoft.public.sqlserver.programming)
  • Temp Table not displaying all inserted data
    ... I am have created a query that would take data from multiple tables and place ... Varchar, ... INNER JOIN dbo.Patient Patient ON Patient.Patient_Key = Patient_Elg. ...
    (microsoft.public.sqlserver.programming)
  • RE: Looking for Table Name as Parameter Alternative
    ... > table names as parameters in a query ... > through the entire database for date fields that are defined as VARCHAR, ... My concern is how to identify date fields that are defined as VARCHAR? ... > want to convert all these fields to DATETIME. ...
    (microsoft.public.sqlserver.programming)
  • Performance tuning the Query given
    ... DECLARE @a_Company VARCHAR ... How to write the above query in a better way, using joins maybe, to ... Such exceptional groups like G5 should be listed under the company C2 ...
    (microsoft.public.sqlserver)