Forum Replies Created

Viewing 15 posts - 346 through 360 (of 1,217 total)

  • RE: Trouble linking data from another table

    I tried to generate the enviroment from what you posted and this is the result... can not guarantee that it works well in all situations.

    /*environment for testing*/

    create table [OPS Sepia$Extended...

  • RE: Trouble linking data from another table

    I think that your problem is in the fact that you don't have clearly defined requirements. Maybe if you try to describe in words what precisely should be returned in...

  • RE: Find the intersection of multiple table

    Hmm... why shouldn't it work correctly? If by intersection you mean that the value is present in all tables, then it shouldn't make any difference in which order you look...

  • RE: Multiple Word Search

    Search string has to be split into words, but these words can be searched within one statement with AND or OR, as appropriate.

    SELECT product_id

    FROM products

    WHERE description LIKE '%screen%' OR description...

  • RE: Case statement help

    No, not with this type of CASE statement. It could be done like this:

    SELECT CASE

    WHEN RowNum IN(1, 10)...

  • RE: SQL script runs 40x faster than same code in stored proc?

    Does the procedure use some parameters? When running the code as a script, are you replacing these parameters with hardcoded values? If yes, look up "parameter sniffing" on these forums......

  • RE: Troubleshooting aggregate function

    When I cut out part of the code in green (+declarations), the result was what you consider correct result - i.e. addition occurred. If we are to find the source...

  • RE: Troubleshooting aggregate function

    Hi,

    I don't understand it fully yet - will try to look into it later - but there is one thing that's strange:

    First, you declare variables as VARCHAR

    @CardNmbr as varchar(9)

    Declare @day...

  • RE: Read File transformations error in package

    You can delete the post yourself. Just click "Edit Post" and then instead of editing use "Delete Post" button. (Actually, I never tried that with an original post, only with...

  • RE: Matching query

    You're welcome... mostly I only write comments when the query is finished, and I wasn't sure whether I understood the requirements or not, so I didn't comment it at all....

  • RE: Missing 0

    And a more general version, handy when you need to achieve given length, but have to add variable number of leading zeroes to do it.

    DECLARE @Zips TABLE (ZipCode varchar(10))

    SET NOCOUNT...

  • RE: Matching query

    Just being curious - which of the solutions did you choose, mine or Koji's? And which performs better on your real data?

  • RE: Matching query

    Well, if the problem was only in the desired result or in the sample data, then all is OK. Let me know whether my code works.

    BTW, I forgot to post...

  • RE: Matching query

    Hm.. but 2007-08-02 11:18:21.967 is GREATER than 2007-08-02 11:18:11.967 !! So that means matchID 2 should have no match, not matchID 3.

  • RE: Matching query

    This gives the required result as I understood it from description - it differs where the posted desired result does not follow the rules of description (see previous post).

    SELECT COALESCE(X.transdate,...

Viewing 15 posts - 346 through 360 (of 1,217 total)