Forum Replies Created

Viewing 15 posts - 211 through 225 (of 1,217 total)

  • RE: CTE in trigger not working

    Did you try to rewrite the trigger with derived table instead of CTE? Did it work correctly that way?

    I'm not sure whether CTE work properly with triggers (I'm comparatively new...

  • RE: SQL Hex Character conversion?!

    Yes, that's what I supposed - that the form distorts characters before they get to SQL... it doesn't have anything to do with collation. You need to change the script...

  • RE: SQL Hex Character conversion?!

    I don't think it would make any sense to SELECT something as a certain collation... collation says, how the data is stored in the database with respect to ordering and...

  • RE: SQL Hex Character conversion?!

    peitech,

    from the pictures you posted I suspect that the hash could be generated outside SQL... what type is the form you are using to input data? Is that PHP? Check...

  • RE: Slow Running SP

    Hello,

    it is hard to tell without dissecting the code, and not knowing the data types, indexes and amount of data in tables, but I can see one possibility... there are...

  • RE: Finding Available Keys When Merging Two Tables

    metawizard2,

    now that you explained your background, I can understand better why you chose the way you described... and I'm glad you started to explore the set-based approach. If you'll work...

  • RE: Finding Available Keys When Merging Two Tables

    Hello,

    I have to say that while the procedure described leads to correct result, it seems to be lacking certain ingenuity so often found in the articles here. In my opinion,...

  • RE: Cursor capacity

    Steve,

    I think this is language issue... what the poster (probably) wants to know is not theoretical capacity of a cursor, but how many rows currently are in the cursor that...

  • RE: Query

    bhaumik,

    I still have problem to see through your data structure.

    What means "id" column in table MaterialInventory? From your example with "web1" it seems, that "id" in table MaterialInventory is just...

  • RE: SQL Query returning number of updated tasks in a day

    Use something along these lines (no guarantee, since you didn't post table structure - but it should give you idea how to strip time from datetime value):

    SELECT DATEADD(d, DATEDIFF(d, 0,...

  • RE: group selects

    ayreshp (12/13/2007)


    for other column I do

    (select sum(teste.qtd) from teste where teste.setor_dest= 'QCC') AS TT

    however is returning the first registro equal for all.

    The problem in your query is, that...

  • RE: Cursor capacity

    Maybe it would be better not to use cursor at all... in most cases, it is possible to find a set-based solution which performs much better than cursor. Could...

  • RE: Select where not null

    To avoid correlated subqueries and gain better performance, you might try this:

    As a basis, you need to have a query, which finds the correct date for each ID.

    SELECT id, MAX(date)

    FROM...

  • RE: Query

    I am not sure whether I understood what you want... I'm not even sure about relations between the tables. Can all three tables be joined on ID column?

    If you want...

  • RE: Sub-select vs. cursor + sp_executesql

    I'm returning back to the original question... although there is not a rule that would apply always, IMHO "rule of the thumb" means something different - a rule that can...

Viewing 15 posts - 211 through 225 (of 1,217 total)