Forum Replies Created

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

  • RE: Relationship Problem

    Payment :          (referenceNo,invoicePaymentId,securityPaymentId,billPaymentId,

    DealerId, customerId,branchId, payCode , mobileNo)

     

    1 payment can serve many mobileNo (companies for example)

     

  • RE: Can this be done in set based TSQL

    The result is not formatted as yours but you can see the related sets. I checked the execution times and there is a big improvement.

    The base ideea is to...

  • RE: Conditionally Incrementing a Counter in a While Loop

    I  m affraid they are asking you to pick 1 by 1 in a roll and retain the roll time... not to pick 5 in 1 roll (1 datetime) but to pick...

  • RE: Conditionally Incrementing a Counter in a While Loop

    "Not content to consider that random enough, my user prefers not to use the first 10"

    Hmm since you have RANDOM numbers there is NO sense to go and pick on Nth row pattern.

     

    The solution...

  • RE: Can this be done in set based TSQL

    are this ones possible??????

    SELECT '644', '645'     UNION

    SELECT '645', '644'     UNION

    118        107

    405        107

    107        118

     

    I thought you have an tree ,,,

  • RE: Delete on linked server

    try

    TRUNCATE TABLE Ora..MySchema.MyData

    if it fits your needs. Won t be able to undo changes

  • RE: Can this be done in set based TSQL

    SET NOCOUNT ON

    DECLARE @Relations TABLE

    (Main VARCHAR(10),Related VARCHAR(10))

    INSERT @Relations

    SELECT 'AA', 'BB' UNION

    SELECT 'AA', 'CC' UNION

    SELECT 'AA', 'DD' UNION

    SELECT 'BB', 'EE' UNION

    SELECT 'MM', 'NN' UNION

    SELECT 'SS', 'MM' UNION

    SELECT 'WW', 'XX' UNION

    SELECT 'XX',...

  • RE: Conditionally Incrementing a Counter in a While Loop

    " As to your point about not expecting any failed updates, I don't really consider an infinite loop a failed update" -I gave you the reason why this happened

    The solution...

  • RE: Time Stamp field when row is updated

    the cursor will do the same : update all all rows

    what you need is

    for insert put default for your field getdate() in table

    for...

  • RE: set var = to sproc result

    BOL

    Execute a stored procedure:

    [ [ EXEC [ UTE ] ]

        {

            [ @return_status = ]

                { procedure_name [ ;number ] | @procedure_name_var

        }

        [ [ @parameter = ] { value...

  • RE: Time Stamp field when row is updated

    ALTER TRIGGER [tr_LastUpd.sql]

    ON [dbo].[Assets]

    FOR

    INSERT, UPDATE

    AS

    ...

  • RE: JOIN with LIKE?

     

    declare @a table(name varchar(50))

    declare @b-2 table(name varchar(50))

    insert into @a

    select 'AOSMITH%' UNION ALL

    select 'AARP%' UNION ALL

    select 'AASCHAASACQUISITIONS%' UNION ALL

    select 'ABXAIRINC%' UNION ALL

    select 'ACCOWILSON%' UNION...

  • RE: JOIN with LIKE?

    try

    Select A.*,B.* from ViewA as A JOIN ViewB as B

    ON B.Name2 LIKE A.Name2

  • RE: Conditionally Incrementing a Counter in a While Loop

           WHERE   r.RandomNumber % @Interval = 0

           AND     r.RandomNumber = @Counter

    equals

           WHERE   @Counter  % @Interval = 0

           AND     r.RandomNumber = @Counter

     

     

    Q1 - Which is...

  • RE: Lock Timeout Alert

     

    BOL

    Use the query wait option to specify the time in seconds (from 0 through 2147483647) that a query waits for resources before timing out. If the default value of -1...

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