Forum Replies Created

Viewing 15 posts - 4,906 through 4,920 (of 6,036 total)

  • RE: T-SQL and The Excel Solver

    Jeff, I see nothing was dealt here.

    Key words:

    We have been asked to add some additonal calculations into the database which have been specified in Excel. 

    Guys just copied Excel tables...

  • RE: T-SQL and The Excel Solver

    Nice tries, my friends.

    But I would fire a database designer who puts same meaning values in different columns of the same table. Immediately. Without any discussions.

    You should not compare values...

  • RE: Multple If Statements with slow performance

    @ShipmentStatus is varchar(10)

    What is datatype of column ShipmentStatus?

  • RE: Grouping issue

    You should not have data solutions based on human knowledge.

    Application should not rely on your memory.

    You've no categories unless you've got them in database.

    Create table "Category" and insert 3...

  • RE: Grouping issue

    > The categories are not stored in the database

    They should be. You cannot report something what does not exist.

    > but if they matches some conditions they fall into that category

    So,...

  • RE: Locking up on Trigger call

    Welcome to the club!

    Have been there, so can probably explain.

    Trigger is a transaction. It waits utill all its commands completed to commit or,...

  • RE: Calculating Expiry Date when you only have an Effective Date

    cls, did you hear about ISNULL system function?

  • RE: constraint: enforce unique key on subset of rows

    Can you explain what exactly do you mean by the last sentence?

    If you have "deleted" row with the same Client_id and Code_id as you are trying to insert you must...

  • RE: Calculating Expiry Date when you only have an Effective Date

    Both solutions are wrong.

    If you use TOP you must specify ORDER BY. Otherwise your result depends on occasional physical order of rows in table.

    Try this:

    --create temp table and populate values

    create...

  • RE: Minimum values

    If some body has depression and gonna commit suicide, please try to help them out and then start giving big big lectures!

  • RE: Calculating Expiry Date when you only have an Effective Date

    You must LEFT join table to itself on JT.Effective_Date > T.Effective_Date

  • RE: constraint: enforce unique key on subset of rows

    If you want to "undelete" "deleted" row you must change status on existing row, not create duplicates.

  • RE: Minimum values

    Wrong table design again.

    People, relational database IS NOT EXCEL SPREADSHEET!!!

    Table must look like this:

    Row#  DataRange  DatValue

    1         ColA         5

    1         ColB         10

    1         ColB         12

    1         ColD         0

    2         ColA         4

    2         ColB         2

    2         ColB        ...

  • RE: Using USE when the database doesn''''t exist.

    But I would do just this:

    IF EXISTS(SELECT * FROM MASTER..SYSDATABASES WHERE NAME = 'myTESTdb')

    EXEC ('exec myTESTdb.dbo.SomeMoreTsqlProcedure')

  • RE: Maths Operation On Result From 2 Subqueries

    Yes, you are right, but I prefer to use NULLIF. It provides better performance.

    ISNULL(SUM(correct)*100 /NULLIF(SUM(answered ), 0), 0)

    And if you need not integer percentage you need to use...

Viewing 15 posts - 4,906 through 4,920 (of 6,036 total)