Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: Table Information Display

  1. #16
    Join Date
    Dec 2009
    Posts
    79
    Yes...in both 2000 and 2008 (although without the WHERE clause I get the create dates for every table in my database, which I don't need)

    As an FYI: This table is updated weekly as the result of a DTS package (and yes, I know, I need to redo it into an SSIS package – haven’t got there yet though).

    The DTS package drops the existing table, recreates it, and then imports this hue-mung-i excel spreadsheet into the newly recreated SQL Server table.

    In my program, I have a screen which allows the users to selected fields from this table in order to perform ad hoc queries which gives them raw data dumps.

    I have the create date displayed in the window caption. This allows the users to know that the data they will be going after is up to date (this is why I need that create date.)

    (I just received official confirmation that our migration will be occurring next weekend - yea! )

  2. #17
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    Just to confirm

    you get all other information and empty date when you have WHERE name=''
    you get all information including date for the able when you do not have WHERE condition

    Sounds like a formatting problem on date field. It does not make sense though.

  3. #18
    Join Date
    Dec 2009
    Posts
    79
    To be completely clear, I am getting the information (create date) for my individual table. However, in order to get the create date I am using this).
    Code:
    SELECT so.[name] AS [TableName], 
    so.[crdate] AS [CreatedDate] 
    FROM information_schema.tables AS ist,
    sysobjects AS so  
    WHERE ist.[table_name] = so.[name]
    AND so.[name] = 'Name Of Table'
    Below is the way I was doing it, and it returns an empty field in 2008, but still works just fine in 2000.
    Code:
    SELECT crdate 
    FROM sysobjects 
    WHERE [name] = 'Name Of Table'

  4. #19
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    It works in my environment, Microsoft SQL Server 2008 (SP1) - 10.0.2531.0

    Which version are you using?

  5. #20
    Join Date
    Dec 2009
    Posts
    79
    Hopefully there isn't anything in here that I shouldn't be posting
    Quote Originally Posted by SQL Server 2008 About Box
    Microsoft SQL Server Management Studio 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
    Microsoft Analysis Services Client Tools 2007.0100.1600.022 ((SQL_PreRelease).080709-1414 )
    Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
    Microsoft MSXML 2.6 3.0 5.0 6.0
    Microsoft Internet Explorer 7.0.5730.11
    Microsoft .NET Framework 2.0.50727.3603
    Operating System 5.1.2600

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •