Forum Replies Created

Viewing 15 posts - 8,491 through 8,505 (of 8,731 total)

  • RE: [Err] 22003 - [SQL Server] Arithmetic overflow error converting numeric to data type numeric.

    Have you tried using DECIMAL(12,4)?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need to setup the replication

    You can start here.

    http://msdn.microsoft.com/en-us/library/bb726002(v=sql.105).aspx

    http://www.simple-talk.com/sql/database-administration/sql-server-replication-crib-sheet/

    http://www.cryer.co.uk/brian/sqlserver/howtoreplication.htm

    But you'll find more information here:

    http://duckduckgo.com/?q=SQL+Server+replication

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    I'm almost sure that you're not completely sure on what the code is doing.

    You added a completely unnecesary subquery that will increase the work on the server.

    After you added the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query help

    This is very similar to Howard's with a slight difference in the Quarter calculation and making the conversion for MonthlyAmt.

    You really should reconsider your data types.

    SELECTAYear,

    (((AMonth - 1) / 3)...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    My code won't return that result at all.

    Please check again. I'm posting the same code and it's giving me the expected results.

    Take the time to understand the code and be...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    What was wrong with my query?

    I suggest you to read this post as well

    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    chinye2020 (8/31/2012)


    Msg 319, Level 15, State 1, Line 13

    Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    That's not complete.

    Where is the balance column on @Tbl_Account?

    Where's Tbl_Topup?

    You should give us something that we can use by just copying, pasting and executing.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    Sean is right, DDL and sample data would have been a great help. As well as posting your whole problem.

    You should pay more attention to your code to make it...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to inside 2 action in the select CASE?

    You can't put a SET inside a SELECT.

    You should separate your statements.

    Another point is that both statements in your CASE are the same.

    What are you trying to accomplish?

    --Modification set as...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Database testing tools

    What do you want to test?

    Have you checked the RedGate tools?

    Most tools will be dependant on the DBMS.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: select all the relationship data

    Great, remember to remove the static values and replace them with variables.

    Also, it's better if you list the columns you need instead of using the asterisk (*)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: select all the relationship data

    It shouldn't be difficult and you must understand it before you use it.

    Read about Recursive CTEs.

    If you have a specific question, don't hesitate to ask it.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Copy results, update a few fields, reinsert

    I believe there's a problem with your insert trigger. It might be prepared for single row inserts. You might want to check it as it can be a general problem...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Loading the distinct rows in the destination table fromt the source table with some logic

    I came out with two queries but I'm sure someone can get something better.

    The first one works with only one change (2 rows per schedule), the second one will work...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 8,491 through 8,505 (of 8,731 total)