Checking datatypes of a field accoss multiple tables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tdmailbox@yahoo.com

    Checking datatypes of a field accoss multiple tables

    I have a tables called subsid that I need to change the datatype from
    text to int.

    I think I got them all but is there a query I can run that will check
    all fields call subsid accross all tables that are of type text.

  • Dan Guzman

    #2
    Re: Checking datatypes of a field accoss multiple tables

    Try:

    SELECT TABLE_SCHEMA, TABLE_NAME
    FROM INFORMATION_SCH EMA.COLUMNS
    WHERE
    COLUMN_NAME = 'subsid' AND
    DATA_TYPE = 'text'

    --
    Hope this helps.

    Dan Guzman
    SQL Server MVP

    <tdmailbox@yaho o.com> wrote in message
    news:1113780531 .744940.153260@ l41g2000cwc.goo glegroups.com.. .[color=blue]
    >I have a tables called subsid that I need to change the datatype from
    > text to int.
    >
    > I think I got them all but is there a query I can run that will check
    > all fields call subsid accross all tables that are of type text.
    >[/color]


    Comment

    Working...