Forum Replies Created

Viewing 15 posts - 13,651 through 13,665 (of 13,838 total)

  • RE: query logic on frequent update

    Rolf, it would help me to know a bit more about the current db schema. I'm guessing that you have something like:

    Product(ID (PK), Description)

    DistributorA(ProductID (PK), CurrentPrice)

    DistributorB(as above)

    DistributorC(as above)

    with ProductID...

  • RE: Insert daily records from one table to individual merchant tables

    Is there any reason why you don't have a single table for all the merchants, containing a 'MerchantID' field to identify which merchant it is from? Then you could...

  • RE: Need help with a calculation trigger

    I think something like this should work. You need to read BOL for more info on how triggers work, but this one uses a notional recordset called 'inserted', which...

  • RE: Msg 2754 from Transact-SQL

    Use this:

    raiserror('',20,1) with log

    which will terminate the client connection (severity > 19) and write to the error log.

    Regards

    Phil

  • RE: "Ignore alpha command" -- Please Help

    I reckon you need to use the isnumeric() function and treat the numeric and non-numeric codes separately. Try something like this:

    SELECT ITEMNO AS Item

    FROM [ITEMMAST-10-25-04]

    WHERE isnumeric(itemno) = 1 and...

  • RE: SQL

    Maybe something like this will help - calculate week number and then group on that - no looping required.

    SELECT

    (datediff(d,'2001-01-01',entrydate) / 7 + 1) as week

    COUNT(orderno) AS NumberofTotalOrders,

    ...

  • RE: Upgrade 7->2k; help with collation problems!

    Check out this thread for additional info:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=139473

    On the surface, programmatically changing collation orders doesn't seem too difficult a concept, until you realise that you need to drop associated constraints/indexes etc...

  • RE: rewrite code to eliminate isnull

    It seems to me that your code is doing exactly what you want it to do, so where is the problem?

    Anyway, if you have some sort of nullophobia (

  • RE: converting hours to minutes

    Here's another (similar) way:

    declare @time nvarchar(20)

    declare @timefloat float

    declare @minutes int

    set @time = '211:34'

    set @timefloat = replace(@time,':','.')

    set @minutes = floor(@timefloat) * 60 + (@timefloat - floor(@timefloat)) * 100

    Regards

    Phil

  • RE: sql server job vs query analyzer

    My understanding is that scheduled SQL job steps run as transactions, ie they either fail or succeed. Partial success is not a possible outcome - as it appears to...

  • RE: Problem converting Money data type to Float data type

    I agree with Osoba - have played with Round, casting to decimal etc and nothing works elegantly. If you do not change the datatype of the column in the...

  • RE: Importing multiple text files using same package

    Hi Jana

    If the filenames are always the same, why not just create 12 separate imports that run one after the other as part of the same DTS package and use...

  • RE: Retruning Clause ?

    Though 'retruning' is a great-sounding word, I think you mean returning?

    Great question - I'm assuming that you're performing an insert to a table...

  • RE: Paid-Time-Off Calculation.

    Yuk! If no one has anything already written, I will help you out. Presume you're planning on using VBA?

    Regards

    Phil

  • RE: Terminating Transactions

    A thousand records is hardly a spike for most hardware running SQL Server. What problems are you experiencing? Do you actually mean 'terminate', or just 'freeze' and perhaps...

Viewing 15 posts - 13,651 through 13,665 (of 13,838 total)