Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)

  • RE: Searching for a string in two unrelated tables

    Thanks for this I was going to write a cursor, sometimes things are staring you in the face.

  • RE: Strange behaviour on simple import from .xls

    Jack Corbett (7/10/2008)


    Could you post some sample data?

    Dates are all in the format 15/12/2006 yet SQL doesnt see it that way. I'm thinking they are alligned differently hence the descrepancy...

  • RE: String to datetime

    BULK INSERT [Temp]

       FROM '\\WLONS.CSV'

       WITH

          (

      FIRSTROW = 2,

             FIELDTERMINATOR = ',',

             ROWTERMINATOR = '\n'

          )

  • RE: String to datetime

    Brandie thanks again for the input. My staging table import field is as follows

     

    [Date_On_List] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

    When i do the insert and check the data it looks fine...

  • RE: String to datetime

    Still experiencing problems with this.

    I am importing using bulk insert from a .csv file. In the file the date is being stored as

  • RE: String to datetime

    Thanks Brandie

    From my CSV file which is holding the date in the format of

    20/07/2007

     I tried the following

     

    select...

  • RE: String to datetime

    Thanks Chirs looks like bum data in one of the fields I will investiagte. Appreciate the help

  • RE: String to datetime

    Thanks Chris

     

    I tried

     

     

    SELECT CONVERT(DATETIME,(RIGHT(Date_On_List,4) + '-' + SUBSTRING(Date_On_List,4,2) + '-' + LEFT(Date_On_List,2)))

    from [Temp]

     

     

    but i still  get the Syntax error converting datetime from character string.

Viewing 8 posts - 16 through 23 (of 23 total)