Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    10

    Unanswered: Looking up Dates

    Hi, I have another problem with my MS SQL Database 7.0. I am connecting to it from Delphi 7.0 with an ADO connection, and I have a database table of the call details that come into the call center. When I try and run the following SQL query, the first column, which is CHAR Size 10, physical Length 11 comes with with garbage, instead of a number. Here is the SQL query:

    select * from CallDetail where DATENAME(weekday, InitiatedDateTimeGmt) = 'sunday' and InitiatedDateTimeGmt between '10/10/2003 00:00' and '10/16/2003 00:00'

    The interesting part of it is, when I delete the where part of the query, the table comes up fine, with the right values in the first column.

    Does anyone have any ideas what could be wrong with it?

  2. #2
    Join Date
    Sep 2003
    Posts
    522
    When I try and run the following SQL query, the first column, which is CHAR Size 10, physical Length 11 comes with with garbage...
    what do you mean by that?

  3. #3
    Join Date
    Oct 2003
    Posts
    10
    Originally posted by ms_sql_dba
    what do you mean by that?
    For the first record that came up, in the first column the value was aBN0I7NwVX even though I know that the value is not supposed to be that, because it is a number. When I open up a BDE connection to the database, and browse there in data tab, they all come up fine.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by aimtech
    For the first record that came up, in the first column the value was aBN0I7NwVX even though I know that the value is not supposed to be that, because it is a number. When I open up a BDE connection to the database, and browse there in data tab, they all come up fine.
    What happens when you do DBCC CHECKDB?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Oct 2003
    Posts
    10
    Originally posted by Brett Kaiser
    What happens when you do DBCC CHECKDB?
    ummm how do I do that?

Posting Permissions

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