Forum Replies Created

Viewing 15 posts - 8,206 through 8,220 (of 8,731 total)

  • RE: Table and Column naming convention

    The "." is not part of the table name, it's the schema name.

    You could check the Stairway for Database Design, it can give you an introduction to a naming convention.

    I...

    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-restrict output

    I don't know the whole structure of your table, but this might give you something to start.

    You might need to add some fields or add the extra time to get...

    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: Convert int to time

    You only calculated minutes.

    SELECT CONVERT(VARCHAR,Duration / 3600) + ':' +CONVERT(VARCHAR,(Duration %3600) / 60) + ':' + RIGHT('00' + CONVERT(VARCHAR,Duration % 60),2) as DURATION

    FROM (SELECT 16167 duration)CDR

    You should post in 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: stored procedure problem_urgent!!!

    You should be able to test your code, no one is perfect to say it's not necessary.

    Why don't you install SQL Server Express with tools to test on your computer?

    There...

    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: stored procedure problem_urgent!!!

    Sean Lange (11/9/2012)


    Luis Cazares (11/9/2012)


    I'm a little more considerate than Sean and will tell you where to start. All these articles are at your disposal just by pressing F1 in...

    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: T-SQL Help

    Read this article about pivot and cross tabs

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]

    Then come back if you have any questions.

    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: stored procedure problem_urgent!!!

    I'm a little more considerate than Sean and will tell you where to start. All these articles are at your disposal just by pressing F1 in SSMS.

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

    "New" way...

    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: Convert int to time

    I'm not sure what are you trying to do. However, a simple way to convert seconds in int to time would be like this.

    SELECT CAST( DATEADD( ss, 6974, 0) 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: dynamic WHERE clause

    Take a look at this article by Gail Shawn on "Catch all queries"

    http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/

    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 INTO synonym raise error

    I found it because I knew it was there, but it's not in the obvious place. 😉

    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 INTO synonym raise error

    Taken from BOL, INTO Clause:

    http://msdn.microsoft.com/en-us/library/ms188029.aspx

    You cannot create new_table on a remote server; however, you can populate new_table from a remote data source.

    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: Is it possible to create a script that will generate a create table script for all tables in a database at once?

    In SSMS you can right click on the database and use Tasks-> Generate Scripts...

    That will give you plenty of options to generate the scripts for all or some of 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: How to use CASE & TOP 1 in a subquery?

    You have an error in your subquery, but I'm not sure if it's a missing comma or an additional field.

    I can't check all the code you posted, I don't know...

    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: replace null with text information

    Eugene Elutin (11/9/2012)


    Yep, ISNULL or COALESCE, but...

    In order to mix string "No Data" with numerics in the same columns, you will need to convert all of them into varchar. This...

    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: replace null with text information

    Use ISNULL or COALESCE

    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,206 through 8,220 (of 8,731 total)