Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 1,162 total)

  • RE: Trouble with large set of data

    It's going to be difficult for people to help if the query posted doesn't bear any resemblance to the query you're having problems with.

    So, the real query uses a...

  • RE: conditional inner join

    You don't need to use dynamic sql. The easiest way to do this would be to have two select statements and an if else to decide which one to run....

  • RE: getdate() convert function

    Maybe I misunderstood the OP, but I thought the expected output was a datetime with seconds and milliseconds stripped off, which is what my first post gives isn't it?

  • RE: getdate() convert function

    select convert(datetime,convert(char,getdate(),100))

  • RE: If Else Strangeness

    The SQL is parsed before it evaluates the conditions of the IF statement, so you'll need to use dynamic SQL for this, which won't be evaluated until the statement is...

  • RE: VARCHAR(x) VS VARCHAR(MAX)

    The maximum size of a row in SQL Server is 8KB, so all the columns added together must not exceed this.

    The way that varchar(max) gets around this restriction is that...

  • RE: VARCHAR(x) VS VARCHAR(MAX)

    Not quite. If you can guarantee that you will not need to store values greater than 8000 chars, then go for a varchar with a fixed maximum length (of the...

  • RE: BCP IN Fail when ported to different server

    I'd suggest either creating a format file for the BCP command, or as this is SQL 2005, use SSIS which is more user friendly (you can just use the...

  • RE: BCP IN Fail when ported to different server

    If you can recreate the text file, try using yyyy-mm-dd (e.g. 2009-10-21). What regional settings does your client have? I would assume that date types that include abbreviated English month...

  • RE: BCP IN Fail when ported to different server

    Some char to datetime implicit conversions are dependent on the Windows regional settings on the SQL Server. What date format are you using in the file?

  • RE: SQL 2008 database in recovery for 22+ hours!!!?

    I thought the issue was with a recovery after reboot, not recovery after restore?

    It was my understanding that regardless of recovery interval, the data files are not written to until...

  • RE: sp_fileexist

    Well if you really need a hack (and it is a hack), you can map a drive under the context of the local system account by using xp_cmdshell and net...

  • RE: sp_fileexist

    PP-564103 (10/15/2009)


    BrainMan (10/14/2009)


    I've probably answered my own question. Looks to me like it's due to the fact that SS 2005 is running under "LocalSystem", and LocalSystem really cannot see the...

  • RE: Developing on SQL 2008 with SQL 2005 Compatibility

    It's a compatibility mode, not an emulation. It's designed to make sure that any functionality that has been deprecated in 2008 is still supported when in 2005 mode, so applications...

  • RE: Conversion failed .

    Are there always exactly two records seperated by a comma? If so, you could use something like this:

    select a.*

    from TableA a

    inner...

Viewing 15 posts - 1,096 through 1,110 (of 1,162 total)