Forum Replies Created

Viewing 15 posts - 5,971 through 5,985 (of 8,731 total)

  • RE: CREATE VIEW with a SP?

    I'm sorry, I didn't realize that.

    Let me start with the basics.

    A script is a file that contains code. This is true for any programming language.

    A stored procedure is a...

    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: CREATE VIEW with a SP?

    Are you sure that you created the SP and not just saved the script?

    You're missing the CREATE PROCEDURE statement.

    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: Get missing dates in table

    You could create a cte with all the dates and check for the ones you're missing.

    Here's an example but you might want to change the code to include more values...

    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: Are the posted questions getting worse?

    Help! I was asked by my DBA to optimize the following query because it has a high cost.

    DELETE MySchema.Facttable

    WHERE datecol = @Date;

    It's part of a stored...

    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: sql question

    Have you tried removing the CONCAT function from the GROUP BY and HAVING clauses? Just use the columns directly on group by and remove them from having.

    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: Date

    Smalldatetime doesn't store or uses seconds. It always rounds to minutes.

    Reference: http://msdn.microsoft.com/en-us/library/ms182418(v=sql.110).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: present yyyymm in format good for calcuation

    That's why your dates should be stored as date data types (date, time, datetime, smaldatetime, datetime2). Otherwise, you'll get on complex calculations like this:

    Declare @pera int = 201310,

    ...

    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: sql question

    I'm really worried on what you might be learning on that site. You're using the old-join style which might seem fine for inner joins but it'll became more confusing with...

    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: deleting duplicate records from a table

    If you try this, I'd suggest to use one of the alternative methods posted in the discussion of the article.

    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 Parse a column.

    I hope that this is part of a data cleansing process because it's complicated and won't be great for performance.

    Here's a possible solution. Be sure to understand it. It uses...

    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: SSRS Report Optimisation Query

    Performance problems can be caused by many things and we don't have enough information. Please read the following article to be able to post what we need to help you.

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    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: SQL Sorting Rules???

    rizzefcazz (8/15/2014)


    Thanks, saw that but the info provided is not specific or does not reflect the actual behavior.

    Luis Cazares (8/15/2014)


    You can find some reference here:

    http://msdn.microsoft.com/en-US/library/ms143515(v=sql.90).aspx

    Why not? It never states that...

    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: SQL Sorting Rules???

    You can find some reference here:

    http://msdn.microsoft.com/en-US/library/ms143515(v=sql.90).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: SQL Sorting Rules???

    SQL Server doesn't order based on unicode values. The collation defines order to a certain point. Why do you need to understand the order of non-alphanumeric characters?

    Maybe you could use...

    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: can sql server add columns dynamically

    Yes, you can do it with dynamic sql. The question is why would you do that.

    Altering the schema to fit an xml file is wrong and should be done 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

Viewing 15 posts - 5,971 through 5,985 (of 8,731 total)