Forum Replies Created

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

  • Reply To: UNION ALL with CTE

    >> I am trying to UNION ALL two tables 1) Current receipts 2) Historical receipts. Both of those tables have CTE because it was the only way how could it...

  • Reply To: group records by week

    Did you know that we've had a DATE data type in SQL Server for many years now? There is no need to use the old DATETIME that was inherited from...

  • Reply To: Create a matrix view from a table

    Hi,

    I have a table called facility:

    id name

    123 Hospital blah blah

    124 Dr's office 1

    125 Dr's Office 2

    126 Hospital 2

    It joins on a table called patient

    patient_id facitility_id

    1234 124

    1234 236

    2345 236

    2345 124

    1235 126

    1235...

  • Reply To: Recursive Triggers

    >> I know there is, somewhere, T-SQL that will allow me to update (keep in sync) a field [sic] that appears in two different tables without them continuously triggering each...

  • Reply To: Help with query

    One of Dykstra's best quotes to his students when they were trying to learn programming was "you're doing everything completely wrong." And he really

    meant it. I prefer the gentler version...

  • Reply To: Complicated Insert SQL with Calculations

    Did you know that by definition, a table must have a key? We cannot have NOT NULLs, so what you post can never be a table. You also have more...

  • Reply To: The same value across 5 or more columns in a table , How can I write a query

    >> I got a table with 5 integer columns and one varchar(100) column. <<

    Where is the DDL? I guess you want us to do everything for you , including read...

  • Reply To: Overwrite Stored Procedure Parameters

    >> GOOD SQL Developers use TOP in their code as well as anything else that their particular version of SQL allows them to use - the only things to avoid...

  • Reply To: Overwrite Stored Procedure Parameters

    One of the rules we had from the early days of structured programming was that a procedure should do one and only one thing, have one and only one entry...

  • Reply To: days between and start date

    Number the days from whenever your calendar starts and repeat a number for a weekend or company holiday.

    CREATE TABLE Calendar

    (cal_date DATE NOT NULL PRIMARY KEY,

    julianize_day_nbr INTEGER NOT...

  • Reply To: Issue with Leading 0

    One of the standard formats displaying a date in the ISO standards is YYYY-DDD, where DDD is a string between "001" and"365" or "366" (depending on leap years). However, I...

  • Reply To: Interpolation/Extrapolation

    t actually in the set.

    If you can find an old calculus, finance, statistics or algebra book, they had lookup tables in the back. Remember that the only computational tools students...

  • Reply To: copy rows in the same table based on conditions

    >> I have the table as in data below<<

    Please look at my credentials. This will let you know I have some authority when I tell you you're doing everything completely...

  • Reply To: Issue with Case statement

    I have a table where I have mix and match records [rows are not records] under "statement" column.

    I am trying to filter based on CASE statement [sic: CASE is an...

  • Reply To: Dates got changed to string when imported

    In SQL the only format allowed for dates is based on ISO 8601. It is"yyyy-mm-dd" , however various products allow you to do proprietary local dialects if you don't give...

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