Forum Replies Created

Viewing 15 posts - 256 through 270 (of 425 total)

  • RE: Find Only Yesterday's Orders?

    getdate()-1 is not "yesterday", but instead a specific time yesterday. So, if processDate is '3/31/2008' it will not be between '3/31/2008 13:01:00' and '4/1/2008 13:01:00'.

    you'll need to truncate getdate()...

  • RE: QUERY help

    yeah, the phrasing of your post sounds like homework. i'm not sure what's considered an 'instance', but the employee table will indeed be referenced 3 times even if it's...

  • RE: I need to add the last day of the month to a result from a column containing only year and month

    try this:

    select enddate, cast((enddate * 100) + 1 as varchar),

    dateadd( day, -1,

    dateadd( month, 1,

    cast(cast((enddate * 100) + 1 as varchar) as smalldatetime)

    )

    ) as endOfMonth

    from

    (select 200812 as enddate

    union...

  • RE: Splitting Table Column on Delimiter

    then you should be able to import the same file into both the "rawdata" table and the 'real/parsed' table in the same load script. (you'll need a seperate fmt...

  • RE: Splitting Table Column on Delimiter

    why not just create a 'real' table, bcp out the rawdata and then bcp that back in with a pipe (|) delimiter to the 'real' table?

  • RE: Problem with Join/Where

    a group by can do what you've described.

    select P.pt_id, min(P.name) as name, min(P.dob) as dob,

    min( case when C.sequence = 1 then C.amt else null end ) as charge1,

    min( case...

  • RE: Business Intelligence Design Studio

    BIDS crashes when moving items in the header pane even with all the patches and SP1. Anyway, I don't want to have both VS 2005 and 2008 installed.

  • RE: Splitting Table Column on Delimiter

    if you can be sure your data has no < symbols (or can live with a character swap), the following approach will work. you can use any function that...

  • RE: select 3/4

    integer division always results in integers. cast one term to float to get a float.

    select cast(3 as float)/4

  • RE: trigger on a row level

    well sergei, it wouldn't be the first time i've seen triggers used to try and clean up data that the front-end should handle/restrict.

    i am surprised that your Great Plains install...

  • RE: trigger on a row level

    we all need to do what we're told, but we shouldn't immediately roll over.

    sorry, but my cynicism on pointless requirements has been well honed over the past two decades. ...

  • RE: trigger on a row level

    i challenge pointless requirements. i want to know why a requirement exists because i've seen far too many 'requirements' turn out to be unused and unneeded.

    what happens if...

  • RE: trigger on a row level

    betcha $20 it's a case of "that is what was said, but this is what was meant". sergei is already spending more time on this than should be necessary...

  • RE: dynamic sql

    thaya2002 (3/18/2008)


    create Procedure FortnightlyJobTransaction

    @@FilterTablevarchar(50)= null,

    @@FortnightEndDate datetime =null,

    @@StartEmployeeNo varchar(50) =null,

    @@EndEmployeeNo varchar(50)=null

    as

    ...

    -- Create Temporary Table

    create table #tmp0 (

    ... )

    -- Populate Temporary Table according to filter criteria

    set @sql = 'insert into #tmp0...

  • RE: trigger on a row level

    i think you're making a mountain out of a molehill.

    if you open a word, excel, or even a text file and then click file>save, the file will get...

Viewing 15 posts - 256 through 270 (of 425 total)