Forum Replies Created

Viewing 15 posts - 76 through 90 (of 109 total)

  • RE: SQL Code Help

    Sorry, duplicated my post by accident. Will try and delete.

  • RE: SQL Code Help

    Yep I agree with you Drew, that's why I asked how many columns were involved, if it was only a couple it might have been feasible.

    What about this way, keeping...

  • RE: SQL Code Help

    Hi,

    How many fields do you need to look at? If there aren't too many you could use a CASE statement, given you work the logic out correctly:

    SELECTEmp_No,

    HR_ID,

    CASE

    WHEN LEN(Emp_No) <...

  • RE: Issue with replace function in sybase

    OK,

    There's a problem... This function will only replace the very first instance of the pattern you are searching for:

    SELECT STUFF(@as_firmSelection,PATINDEX('%,%',@as_firmSelection), CHAR_LENGTH(@as_firmSelection), ''',''')

    Run the above and you'll see what I mean.

    So...

  • RE: Issue with replace function in sybase

    Agreed, haha.

  • RE: Issue with replace function in sybase

    You're right Anthony, however it depends on which version of Sybase you're using.. For instance we've got ASE 12.0 and it doesn't support REPLACE...

    On the other hand we also have...

  • RE: Issue with replace function in sybase

    It seems like the issue you're having is that the REPLACE function won't work in Sybase.. So why can't you try replacing the REPLACE function with this one:

    STUFF('abcdefg',PATINDEX('%def%','cdefghi'), CHAR_LENGTH('def'), 'XXX')

    Or...

  • RE: Issue with replace function in sybase

    Hi,

    Firstly, a SQL Server forum probably isn't the best place to get help on Sybase. Also I'm not really sure on the etiquette of answering these questions, but in the...

  • RE: YTD Summary report

    No problems.

    drew.allen is right in that SSRS or Excel would be better at presenting this info for you, however sometimes we're limited pragmatically to doing things the hard way.....

  • RE: YTD Summary report

    Ahhh OK,

    Try:

    SUM(CASE WHEN MONTH(TradeDate) = 7 THEN 1 END) AS TradeOrderNumber_Jul

    Should work because you're already grouping by month and customer etc.

    Cheers,

    Jim.

  • RE: YTD Summary report

    Hi there..

    I'd like a better solution for doing this as well, because I am often called upon to query data and return it in this format..

    The below is a start...

  • RE: Migration Error - Excel conn MGR

    Nice work. And thanks for posting the solution.

  • RE: Migration Error - Excel conn MGR

    Hi shyamhr,

    So the Dev and Prod servers have different versions of Excel installed?

    Also this smells of permissions issues between the user that created the package on Dev and the user...

  • RE: Bulk insert task Question

    Hi praveensc2003,

    Am I right to assume by 1 lakh you mean 1 million rows?

    If so, the answer is yes, SSIS should be able to easily handle this using an Excel...

  • RE: Anybody use Sybase?

    ASA 8 can be great as some of the SQL syntax is good, like the use of key joins whereby the SQL engine will automatically link tables based on the...

Viewing 15 posts - 76 through 90 (of 109 total)