Forum Replies Created

Viewing 15 posts - 5,866 through 5,880 (of 8,731 total)

  • RE: doubt in writing a CTE query

    I'm sure that it won't return what you expect.

    You're ordering by the individual sales order detail and not the total of the month.

    You shouldn't be using functions on the columns...

    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: Export query results to a pipe delimited text file

    You could use the bcp utility through xp_cmdshell.

    Check the links for information on those.

    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: Getting error while inserting data in a table.

    You might want to change your table definition to prevent truncation errors.

    CREATE TABLE dbo.TraceResults(

    TextData nvarchar(max) NULL,

    ApplicationName nvarchar(256) NULL,

    NTUserName nvarchar(256) NULL,

    LoginName nvarchar(256) NULL,

    CPU int NULL,

    Reads bigint NULL,

    Writes bigint NULL,

    Duration bigint NULL,

    ClientProcessID...

    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 string to Date

    terry999 (9/5/2014)


    Thanks

    My func will look like something like this

    Please tell me that you're not creating a scalar function for this. That'll cause performance problems.

    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 string to Date

    Are you using a format file? How would you handle invalid dates?

    A staging table is a good idea for any data load process. That way you don't mess with already...

    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: Variable - evaluates to include seconds - every reference it has new value (seconds)

    Quick thought, but I'm not an SSIS expert.

    You could assign the value to your variable through a Script task instead of an expression. That way, you'll keep the same value...

    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?

    batgirl (9/4/2014)


    Lynn Pettis (9/4/2014)


    Yes, I actually threw one of Mr. Celko's own arguments back at him in a post talking about dates.

    I liked the COBOL reference since he likes to...

    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: My SQL vs SQL

    sharonsql2013 (9/4/2014)


    All I am trying to do is get a format which is like CURdate in SQL.

    Why? You don't need to format a datetime, it's not a string. You can...

    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: My SQL vs SQL

    Why are you converting a datetime (GETDATE()) into a string that will need to be converted again into a datetime data type?

    Could you post your table definition with sample data?

    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: What will this query return?

    I wonder if people would be surprised by the error in the following query.

    SELECT 1/0 as Result

    WITH cte

    AS

    (

    SELECT 'Result' AS Result

    )

    SELECT *

    FROM cte

    The reason is...

    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: Problem when pass parameters on Query

    Sowbhari (9/4/2014)


    I wouldn't recommend using JOIN or APPLY because it could generate duplicates. In this case, I prefer to use IN or EXISTS.

    Hi Luis C., could you please explain 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: Using COALESCE and also trying to multiply and divide

    jcrawf02 (9/4/2014)


    Koen Verbeeck (9/4/2014)


    jcrawf02 (9/4/2014)


    You mean the show about the conceited narcissistic prick who is unable to properly interact with other humans because he's convinced of his superiority, and constantly...

    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: Problem when pass parameters on Query

    CELKO (9/3/2014)


    3. A column is a scalar value drawn from a domain.

    Can you support this statement with something that is not in your books?

    3. Some operations apply to 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: Using COALESCE and also trying to multiply and divide

    I'm not sure if YYYY-MM-DD is the only display format, but I wouldn't care less about display formats, that's what the front-end is for. We must care to store 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?

    Koen Verbeeck (9/3/2014)


    Bah. I couldn't resist it.

    Someone call the Relational Protection Agency, we have an offender...oh, wait. 😀

    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,866 through 5,880 (of 8,731 total)