Forum Replies Created

Viewing 15 posts - 2,071 through 2,085 (of 2,894 total)

  • RE: Getting two different rows as columns

    dwain.c (3/1/2012)


    My comment was that it didn't work after I exploded the record set out to 50000 records with my CROSS APPLY INSERTs.

    You may try it yourself if you don't...

  • RE: Getting two different rows as columns

    dwain.c (2/29/2012)


    Sorry to be unclear. I referred to the query posted by Eugene.

    Try before commenting. My query returns exactly what OP has asked.

    The rest of solutions are based on...

  • RE: sql server dba

    script it!

    Id you don't know how, create the one empty database in SSMS, then script it out.

    Copy-&-Paste with replacing the db name part.

  • RE: Data from table different from view

    Alexander G. (2/29/2012)


    ...

    The insert happens by daily execution of a sql script (plain delete, insert and update statements, no transactions) starting sqlcmd from an agent job.

    ...

    Does your job have...

  • RE: Help with Logic

    dwain.c (2/28/2012)


    Could you refactor the INSERT statements into the following UPDATE on the Balance table?

    UPDATE b SET [AvlBalance] = [AvlBalance] - [LoadAmt]

    OUTPUT Inserted.[CardProduct], x.[LoadAmt], x.[LoadDate], x.[LoadType]

    INTO [dbo].[Loads]

    FROM [dbo].[Balance] b

    INNER JOIN...

  • RE: Help with Logic

    You are welcome!

    I would like to add some more for your consideration. Usually the solutions like yours would also include some kind of regular (most likely scheduled) reconciliation process, which...

  • RE: Getting two different rows as columns

    Based on your setup you can do the following:

    select T.Name,T1.Title, T2.Title AS [Version], T.USERNAME

    from test1 as t

    join Test as t1

    on t1.Name = t.name

    and t1.id =1

    join Test ...

  • RE: Trigger or Insert issue: Not generating the correct data

    You are welcome!

    Please post your final one, so you get free code review :hehe:

  • RE: Tuning query help

    As the query from your original post only needs a Name, there is no point to use UDF you have. Looks like you can join directly to BIDATAWSQL.DynamicsV5Realtime.dbo.empltable

    Also, as...

  • RE: Trigger or Insert issue: Not generating the correct data

    ram_kamboz2k7 (2/28/2012)


    @Drew

    How do you mean? Currently ev erytime an account is inserted into the call_list table, it automatically generates and that row is inserted into out_calllist table.

    Is there an issue...

  • RE: Trigger or Insert issue: Not generating the correct data

    ram_kamboz2k7 (2/28/2012)


    if bigint is an issue, can nvarchar be used for the telephone number?

    Thanks

    Yes, usually people would use character data type when storing telephone numbers. Howevere, as J. Drew...

  • RE: Data from table different from view

    Do you see the difference in returned resultset in SQLServer MS or in a client/server application?

    Your application may cach the query results, SQLServer doesn't do it. It can cach the...

  • RE: Tuning query help

    Try the following:

    Selectpe.EMPLID, pe.Name

    Into #allempl

    From DynamicsV5Realtime.dbo.PROJTABLE proj

    Join udf_R000_EmployeeList() pe On proj.RESPONSIBLEFINANCIAL = pe.EMPLID

    Where proj.DATAAREAID...

  • RE: Tuning query help

    From DynamicsV5Realtime.dbo.PROJTABLE proj

    Join DynamicsV5Realtime.dbo.SalesTable shed On proj.RESPONSIBLEFINANCIAL = shed.MARProjectEngineer

    Join udf_R000_EmployeeList() pe On proj.RESPONSIBLEFINANCIAL = pe.EMPLID

    is very different...

  • RE: Round Function

    In your first sample, you want to round 99.7971 to 99.80 which does look like a ROUND,

    but in the second smaple, you have 99.9959 rounded to 99.99 which looks like...

Viewing 15 posts - 2,071 through 2,085 (of 2,894 total)