Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    28

    Unanswered: Query: Create Table

    SELECT DISTINCT [SemiFinal cmp History].Register, [SemiFinal cmp History].[SemiFinal Date], "" AS [Final Date], "" AS [Submitted Date], "" AS [Invoice Date], "" AS [Remittance Date], "" AS [Cleared Date], "" AS [Order Closing Date] INTO Final
    FROM [SemiFinal cmp History] LEFT JOIN [Duplicate Record] ON [SemiFinal cmp History].[File Num] = [Duplicate Record].[File Num]
    WHERE ((([SemiFinal cmp History].Status)="Include" Or ([SemiFinal cmp History].Status)="Research" Or ([SemiFinal cmp History].Status)="Addition") AND (([Duplicate Record].[File Num]) Is Null));


    Hi:
    The above code is create the Final table with the fields,
    After create it, the [Final Date] datatype is Text. So, from the code, how do I write to change the Date/Time datatype of the [Final Date]. Please let me know, thanks.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    You could change the sql to add a date value rather than "" and then update to Null. Or you could use DDL SQL:

    Code:
     
    ALTER TABLE Final ALTER [Final Date] Date
    From VBA or a SQL Specific --> DDL "query"

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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