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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • 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...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

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