Forum Replies Created

Viewing 15 posts - 3,241 through 3,255 (of 6,036 total)

  • RE: help on modifying a trigger

    Which DEPTID you need - from inserted or from deleted?

  • RE: CURSOR speed - SQL 2000 vs. SQL 2005

    Steve Stout (12/10/2007)


    By 'bad data' I mean data that is not in the correct format. For instance, in the above line item import, I ran across 3 rows which had...

  • RE: CURSOR speed - SQL 2000 vs. SQL 2005

    I have a lot of 'bad' data that has to be allowed for 🙁

    LEFT JOIN to dbo.Product will do just that.

    But can you explain what that "bad" data will mean?

    Bad...

  • RE: CURSOR speed - SQL 2000 vs. SQL 2005

    This will do everything:

    [Code]

    INSERT INTO OrderItems (

    OrderID,

    ItemID,

    Qty,

    QtyDelivered,

    QtyToSend,

    item_price,

    item_cost,

    comments,

    filemaker_discount,

    filemaker_price_per_item_after_discount,

    import_item,

    filemaker_id

    )

    SELECT

    F.order_key,

    P.id,

    F.quantity_received + F.quantity_to_ship,

    F.quantity_received,

    F.quantity_to_ship,

    F.price_per_item

    F.cost,

    comments,

    discount,

    price_per_item_after_discount,

    '1',

    id

    From dbo.posted_order_items_from_filemaker2 F

    INNER JOIN dbo.Products P ON P.ProductCode =...

  • RE: How to replace a diacritic (accent character) by a '-'

    Henk Schreij (12/10/2007)


    Sorry, I wasn't looking for a UDF.

    What I want is something likea patindex to find the char and then stuff it with a -.

    Something like

    PATINDEX ('%[^a-z 0-9...

  • RE: Instead Of Triggers

    No bad experience.

    Except when trigger is badly written.

    Like your one. 😉

    You do insert inside of INSTEAD OF INSERT.

    Besides it does not make much sense, if suddenly nested trigger are allowed...

  • RE: change the Unicode datatype NVarchar to Varchar

    Why CAST is not correct?

  • RE: Query for nth lowest sequence in a group

    SQL33 (12/8/2007)


    If each rock in each pile has a sequence number on it .... would you not then know how to arrange each group, and once arranged which one is...

  • RE: Query for nth lowest sequence in a group

    No sorting or ordering is necessary .. just a select retrieving the nth sequence number for each custlink.

    Man, sequence exists only on ordered arrays.

    If there is no order then...

  • RE: Inline Table Valued Functions in Check Constraints

    AVB (12/7/2007)


    John,

    I would say that your answer of NO is probably correct. Although I am no SQL master so maybe there is a way around it...

    Simple scalar function which returns...

  • RE: Passing a Table to A Stored Procedure

    The reason is tempdb can be a source of contention and you are guaranteeing disk access. If you send in an XML document, especially in 2005, there's a chance it...

  • RE: Grouping & Group by

    [Code]

    SELECT CASE WHEN Total = 1 THEN 'TOTAL' ELSE CONVERT(varchar(10), YearMonthDay) END, Sales

    FROM (

    SELECT YMDH/100 AS YearMonthDay, GROUPING(MySourceTable.YMDH/100) AS Total,

    CONVERT(varchar(30), convert(money, SUM(Sales)),1) AS Sales

    From MySourceTable

    GROUP BY YMDH/100 WITH ROLLUP

    )...

  • RE: Query for nth lowest sequence in a group

    SQL33 (12/6/2007)


    As was initially requested (....I want to query the data shown below in the first dataset to return each entire row containing the nth lowest sequence number for each...

  • RE: Query for nth lowest sequence in a group

    I agree with Sergiy. I think about the physical order data appears in the table.

    There is no such thing as "physical order data appears in the table".

    Physical order of data...

  • RE: SQL for numeric ranges

    to show what ID ranges are already used so the users can pick from the unused ones.

    So, users actually need unused ID's, not used ones?

    :hehe:

    Why don't you want to...

Viewing 15 posts - 3,241 through 3,255 (of 6,036 total)