Forum Replies Created

Viewing 15 posts - 76 through 90 (of 1,424 total)

  • Reply To: A Design Question using a fictious example

    eichnerm wrote:

    Thanks for getting back to me.

    I have always been hesitant to use a flag in one table when I could get that same information using a database query. Since...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How to manage Time zone changes for countries

    gauravkumar9 wrote:

    To maintain each country's local time, we have collected their respective time zones. Initially, everything worked fine. However, as time passed, some countries requested changes to their time zones...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Generating (semi-)fake purchase data

    Hi pietlinden, maybe you want to generate random prices for a base price of 50, plus or minus 5.  Or maybe you want a base price of 50, plus or...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Generating (semi-)fake purchase data

    You're already generating a series using dbo.fnTally so maybe raise fn.N by an exponent power.  Either POWER or EXP function

    declare @increase_pct      ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Two queries or one?

    Yes so I went with 2 queries.  Just because it's possible to jimmy horn different sets in the WHERE clause doesn't mean it's a good idea

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Closest to ProcDate

    Alternately

    with rn_cte as (
    select pv.PatID, pv.AcctID, pv.ProcDate,
    iif(v.abs_diff>=2, null, dv.Department) Department,
    ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Find rows with very close time stamps

    If any consecutive click within 2 seconds is sufficient then the query posted looks ok 🙂

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Find rows with very close time stamps

    daytonbrown2 wrote:

    Given the following table and query, this will return any records(based on message_id) that have timestamps within 2 seconds.  This works and gives me the correct output.

    The query...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: strange selection for update

    Instead of typing up an example I pasted your code next to a table from another topic and then did cut/paste/replace the column names.  "...ts.PKey is not column of subquery"...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: strange selection for update

    joerg.kannengiesser wrote:

    your are right: using a qualifier results in an error (unknown column):

    update TempSel set WertA = 'TEST' where PKey in 
    (select Q1.PKey from (select PKey as...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: From each string, extract numbers following a '#' and create separate row

    Or what's the question?  It seems the topic's scope has crept after solutions were posted

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: From each string extract Numbers following a '#' and create separate row

    SqlRookie wrote:

    ... extract all numbers which follow a '#' and then create a new row for each. 

    So far I'm not seeing a solution for which each character returned is an...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: ETL data load DML SP slowness suggestion

    "This table does not have any index and tigers. It has only PK."

    The FROM and WHERE clauses of the INSERT:

    FROM [DLSTYTOTAL] STG Left Join [TOTAL_RAW] TGT ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Help with unique constraint

    Ant-Green wrote:

    You'll need some app / query logic to prevent it.

    Or a TRIGGER.  This is the sort of situation where one could be appropriate imo

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Check sequential order of status of items

    Yeah, it's not clear.  The next sentence implies only 102 needs to be "printed" out.  I'm picturing one of those giant dot matrix line printers that used to fill up...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

Viewing 15 posts - 76 through 90 (of 1,424 total)