Forum Replies Created

Viewing 15 posts - 4,501 through 4,515 (of 13,465 total)

  • RE: != NOT EQUAL TO Query

    I think the core issue is parenthesis.

    Because of the other two conditions the results still have the values he was trying to filter out.

    and/and/or needs to be handled ,

  • RE: Daylight Savings timezone conversion?

    Khades (10/25/2012)


    Page cannot be displayed :(.

    I have a question, so if daylight savings were to change again in the future, I would have to go update this table correct?

    fixed. i...

  • RE: bulk import help please

    is your data really ending in CrLf, or could it be a file form UNIX, where it's ending in just CHAR(10)? (LF)?

    that would explain the errors.

  • RE: Daylight Savings timezone conversion?

    I've always handled this with a Calendar table, where the Calendar table has DaylightSavings column.

    that is especially important if you fiddle with historical data, because the date ranges for DST...

  • RE: Log in user error

    if the database is restored automatically each day, the easy solution is to add to teh current script, so that after teh restore, the mapping you need is performed.

    if it's...

  • RE: Less than 2 occurances in a string

    Great job on providing the setup of the data.

    by simply comparing the length of the string against the length of the replace of periods, you get the # of periods...

  • RE: bulk import help please

    your data is not just split by commas, is the issue; they are delimited or "Text Qualifed" with single quotes.

    to handle taht gracefully, I think it is much...

  • RE: Editing Stored Procedures in SQL 2005?

    britinusa (10/25/2012)


    Did Google this first and it seems some SQL 2005 do not have the Design option.

    So one literally has to run an ALTER rather than in 2000 where...

  • RE: Trigger not firirng in sql server

    bulk insert does not automatically fire triggers unless you specifically set the flag (FIRE_TRIGGERS ).

    I'm not sure your trigger is not designed to handle multiple rows correctly.

    if i...

  • RE: sp_addlinkedsrvlogin access for non-admin user

    Andy Let me know if this helps at all.

    What i usually do in that specific situation is to create a sql user, without login on the linked server that...

  • RE: Format 235959 as a time w/ AM/PM

    how many chances at this do i get to make it right again?

    select

    [active_end_time],

    val ,

    val + CASE WHEN CONVERT(int,SUBSTRING(val,1,CHARINDEX(':',val) -1)) > 11 THEN ' PM' ELSE ' AM' END...

  • RE: Format 235959 as a time w/ AM/PM

    my sample data was all 6 characters;

    this does the STUFF in reverse order, whhich would handle the 5 char times you are seeing sometimes.

    select

    [active_end_time],

    REVERSE(STUFF(STUFF(REVERSE(convert(varchar,[active_end_time])),3,0,':'),6,0,':'))

    + CASE WHEN CONVERT(int,LEFT([active_end_time],2)) >...

  • RE: Format 235959 as a time w/ AM/PM

    David's got me thinking to day!

    your time datatype error is because of SQL 2005, i assumed you wer ein 2008 because of the forum you picked.

    this puts ont he AM/PM:

    select...

  • RE: Format 235959 as a time w/ AM/PM

    stuff worked for me to convert it to an actual TIME datatype, but the AM/PM would be an extra step:

    select

    [active_end_time],

    CONVERT(time,STUFF(STUFF(convert(varchar,[active_end_time]),3,0,':'),6,0,':') ) as val

    from [msdb].[dbo].[sysschedules]

  • RE: A SQL Server Log Reader

    Jet-Ski (10/24/2012)


    We actually had this just yesterday. Someone deleted 100 records from our CRM, told us about it 30 minutes later. We did a point in time restore, but lost...

Viewing 15 posts - 4,501 through 4,515 (of 13,465 total)