Forum Replies Created

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

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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)) >...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Permission issue for excute export /import

    solomon.jernas (10/24/2012)


    Please can you give proper inputs for that/

    the import/export wizard is just an application. once you have a user name/password so you can loginto SQL server, you can use...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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