Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)

  • RE: Export to CSV using bulk copies data, can't write to local

    Can you try mapping the drive first - so its X:\OutputFiles.csv

    It could be down to the backslash being recognised as an escape character instead of a backslash.

  • RE: "Add" Hyphen Data Modification

    Are you sure this CSM.ticker should be in the first WHEN statement - all the others are VALUE

    WHEN SUBSTRING(CSM.ticker ,LEN(VALUE) - 1 ,1) = 'H'

  • RE: "Add" Hyphen Data Modification

    SELECT

    LINE,

    -- ADD REPLACE TO CHANGE SPACES TO DASHES --

    (CASE

    WHEN SUBSTRING(VALUE ,LEN(VALUE) - 1 ,1) = 'H'

    THEN REPLACE((VALUE + SUBSTRING(VALUE...

  • RE: 2008 R2 mirroring suspended. added a new file on p, drive doesn't exist on m.

    Don't know if clustering will support it - but how about plugging in a USB drive, and mapping that to drive R.

    Let it re-sync and then remove it again.

  • RE: CASE Assistance

    Only if you drop the VCHAR_KEY, as I take it the VCHAR_KEY isn't always the same for each VCHAR.VEND_ID

    SELECT V.VEND_NAME_EXT

    ,SUM(LNHS.CST_AMT)

    ,V.S_CL_SM_BUS_CD

    ,VCHR.VEND_ID

    ,V.CL_VET_FL

    ,V.CL_SD_VET_FL

    ,V.CL_ANC_IT_FL

    ,V.CL_DISADV_FL

    ,V.CL_WOM_OWN_FL

    ,V.CL_LAB_SRPL_FL

    ,V.CL_HIST_BL_CLG_FL

    ,V.CL_ANC_IT_FL

    FROM WEBAPP_CP.DELTEK.V_VEND V

    LEFT JOIN WEBAPP_CP.DELTEK.V_VCHR_HDR_HS VCHR

    ON V.VEND_ID = VCHR.VEND_ID

    LEFT JOIN WEBAPP_CP.DELTEK.VCHR_LN_ACCT_HS...

  • RE: CASE Assistance

    Can't see from what you are saying why a straight query does not work.

    SELECT V.VEND_NAME_EXT

    ,LNHS.CST_AMT

    ,V.S_CL_SM_BUS_CD

    ,VCHR.VEND_ID

    ,V.CL_VET_FL

    ,V.CL_SD_VET_FL

    ,V.CL_ANC_IT_FL

    ,V.CL_DISADV_FL

    ,V.CL_WOM_OWN_FL

    ,V.CL_LAB_SRPL_FL

    ,V.CL_HIST_BL_CLG_FL

    ,V.CL_ANC_IT_FL

    ,VCHR.VCHR_KEY

    FROM WEBAPP_CP.DELTEK.V_VEND V

    LEFT JOIN WEBAPP_CP.DELTEK.V_VCHR_HDR_HS VCHR

    ON V.VEND_ID = VCHR.VEND_ID

    LEFT JOIN WEBAPP_CP.DELTEK.VCHR_LN_ACCT_HS LNHS

    ON VCHR.VCHR_KEY = LNHS.VCHR_KEY

    Which...

  • RE: CASE Assistance

    Give us a clue as to how you want it to look, because this looks like it could just be a basic query with the Y/N's already in the correct...

  • RE: CASE Assistance

    How about just using unions between 4 select statements - assuming all the fields are of the same type.

    SELECT V.VEND_NAME_EXT

    ,LNHS.CST_AMT

    ,VCHR.VEND_ID

    ,V.CL_VET_FL AS [COL1]

    ,V.CL_SD_VET_FL AS [COL2]

    ,V.CL_ANC_IT_FL AS [COL3]

    ,V.CL_DISADV_FL AS [COL4]

    ,V.CL_WOM_OWN_FL AS [COL5]

    ,V.CL_LAB_SRPL_FL...

  • RE: CASE Assistance

    Do they have to be separate columns, or can it just be a string of matches in a field.

    Something like this will give you a comma separated list of the...

  • RE: help in making query

    Rough and dirty, and won't work unless there are at least two years for each week.

    Convert to an outer join if you need to take that into consideration.

    SELECT a.[Fiscal Week],...

  • RE: How to use a year and month fields to get a range of records

    Can't see how the adjustment periods/true-up periods can be incorporated into a calendar.

    Surely they'd conflict with the end date of the old year or the start date of the new...

  • RE: How to use a year and month fields to get a range of records

    Yes, it would be nice to have dates to work with, but not all accounting years start in January.

    A lot of companies have April as period 1, or 13 x...

  • RE: How to use a year and month fields to get a range of records

    Well my previous post didn't actually work for all options, hopefully this does.

    I find it's a very common problem with accounting tables, which often only store the year and period.

    WHERE

    --Everything...

  • RE: How to use a year and month fields to get a range of records

    This is the simplest where clause that works now mater how many years are between the dates.

    If as in this example they are only 1 year apart, or the same...

Viewing 14 posts - 1 through 14 (of 14 total)