Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,217 total)

  • RE: Grouping issue

    I know what you're talking about, and I feel with you. I had to work with a similar system for some time, before we managed to convince the managers that...

  • RE: DBA Certification

    It may also depend on where do you live... but I don't think that their objection is correct. Never heard about this in Czech Republic... In my opinion, working as...

  • RE: what is ''''82.'''' ?

    No. You are not converting NUMERIC into INT. You are converting VARCHAR into INT, and that's why it does not work. Integer data don't include any decimal separators, if you convert...

  • RE: Perform 2 Counts in one query

    We posted almost in the same moment

    Anyway, my query will return 0, not NULL - no matter whether any questions were answered or...

  • RE: Perform 2 Counts in one query

    I hope it will be easier than that - although I may have misunderstood something... Try this:

    SELECT A.InspectionUID, COUNT(*) as cnt_required, COUNT(A.QuestionTreeUID) as cnt_req_answered

    FROM tbl_NSP_QuestionTree Q

    LEFT OUTER JOIN tbl_NSP_Answer...

  • RE: Problem with DELETE that uses subquery

    That's right, Tim.

    LEFT JOIN with a check for NULL, as Aaron posted, is the preferred way of finding out records that have no connected records in another table.

    JOINs are optimized in...

  • RE: Grouping issue

    Sergiy is helping you, but you don't listen...

    Even if you have no chance to alter anything in the database which contains the data (which it seems you can't... but maybe...

  • RE: FIFO and LIFO with Inventory costs

    Hi,

    we are using FIFO in our system, so I can corroborate Sal's observation - since first goods received were of lower value, current stock with FIFO must be higher than with...

  • RE: TSQL Help

    It works for me, so it will probably be something in your data structure.

    What is the length and datatype of the column you want to parse?

    declare @name varchar...

  • RE: TSQL Help

    I had the same problem, but after a while I found the difference

    RTRIM(LEFT([column],PATINDEX('%[0-9]%',[column])-1)) AS [name]

    RTRIM(LEFT([column],PATINDEX('% [0-9]%',[column])-1)) AS [name]

    Do you see the difference...

  • RE: When using XML ?

    Hi,

    you write:

    "But consider that i get the field name (i.e. AprAmtD dynamically in the variable @strAmtD)"

    Does that mean @strAmtD contains BOTH the column name and the value?

    If so, then you...

  • RE: UnKnown Temp table in cursor

    Hello,

    it seems you have some serious problems...

    How can you work with something if you don't know what's the structure?

    How can you define "whereclause" if you don't know what columns are...

  • RE: Return all rows for todays date, and yesterday.

    Yes Trystan,

    if I didn't make any mistake in the code (I didn't have time to create tables and sample data to test it), the query with derived table I posted yesterday...

  • RE: Return all rows for todays date, and yesterday.

    Because "WHERE something IN (SELECT ...)" is generally a bad idea because of performance and I prefer to avoid it. I would prefer a solution with a derived table, if...

  • RE: Return all rows for todays date, and yesterday.

    Sorry for cluttering this thread with posts, but (if we stick to a solution with IN clause), this would be simpler and it does precisely the same as SQL in...

Viewing 15 posts - 571 through 585 (of 1,217 total)