Forum Replies Created

Viewing 15 posts - 8,791 through 8,805 (of 26,490 total)

  • RE: Assigning a date to a field

    This??

    ALTER PROCEDURE [dbo].[rpt_DCF_Utilization_sp]

    (

    @ENDdate datetime,

    @FISCALDATE DATEtime

    )

    as

    DECLARE @ENDDATE DATE, @fiscalstart DATE;

    set @ENDdate = '02/01/2013'

    set @fiscalstart = dateadd(mm, 6, dateadd(yy, datediff(yy, cast('19000101' as date), dateadd(mm, 6, @ENDdate)) - 1, cast('19000101' as date)))

    SELECT TOP...

  • RE: create database failed

    sumith1andonly1 (2/14/2013)


    its my challenge to to solve it myself...

    Question not asked, are you the DBA on this server?

  • RE: Assigning a date to a field

    Or this:

    declare @TestDate date = '20120612';

    select

    @TestDate,

    dateadd(mm, 6, dateadd(yy, datediff(yy, cast('19000101' as date), dateadd(mm, 6, @TestDate)) - 1, cast('19000101' as date)));

    set @TestDate =...

  • RE: Date function

    If you can't post the DDL (CREATE TABLE statement) for the table(s) involved, sample data (as INSERT INTO statements) for the tables involved, and expected results based on the sample...

  • RE: Spilt List Function

    eagb (2/14/2013)


    This must be much simplier than I'm making it...

    I have an unique idenifier for a person, and a space delimited field containing grades they teach, since they could teach...

  • RE: Why does this get me multiple records?

    Sean Grebey (2/13/2013)


    Trying to return just a single record for the max audit date for an agent. I thought this would do it:

    select completed, Max(auditDate) from tblAudit_AuditSchedule where agentNumber =...

  • RE: Case Statement Issue

    Gazareth (2/13/2013)


    Hi,

    Don't think it's that - things to check are all dates surrounded by single quotes ' (best practice would be to use ISO format - 'yyyy-mm-dd') and the column...

  • RE: How to get the first day of preceding month

    Using T-SQL:

    declare @MyDate datetime;

    set @MyDate = '20121229';

    select dateadd(mm, datediff(mm,cast('19000101' as datetime),@MyDate) + 1, cast('19000101' as datetime)), @MyDate;

  • RE: Exclude records from list where one record equals a particular value

    Lowell (2/12/2013)


    NineIron (2/12/2013)


    Here's an example list. I need to exclude this MRN from my query because it contains the value 250.

    MRN ...

  • RE: Neew T-SQL for setting date

    briancampbellmcad (2/11/2013)


    UPDATE [tblTransactions] SET [AllocatedDate] = ........

    Basically I need to set AllocatedDate to "Today" using something like "Now" or "Now()"... any ideas? Thanks!

    UPDATE [tblTransactions] SET [AllocatedDate] = getdate();

  • RE: Change rows into column without using pivot method.

    Answer to what? You didn't give us anything to work with here.

  • RE: Bulk insert messing up fields

    Another alternative is to use a staging table for the data being imported. Using what you have posted, pdtest (without the identity column) serves as a staging table for...

  • RE: Bulk insert messing up fields

    Several problems you need to deal with.

    One, the columns you originally defined do not match the columns as listed in your source file. Please look at the new table...

  • RE: Backups to a Share Drive

    I am assuming that E is a mapped drive to a shared network resource?

  • RE: Bulk insert messing up fields

    One other thing, since you are not using a format file, your test file needs to account for the CustID (IDENTITY) column as well.

Viewing 15 posts - 8,791 through 8,805 (of 26,490 total)