Forum Replies Created

Viewing 15 posts - 4,906 through 4,920 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    jasona.work (5/21/2015)


    If I bring up the fact that I've not read The Thread from start to finish, does my secret SSC decoder ring get taken away?

    :w00t:

    So that's the reason 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: Stored Procedures Local vs. Cloud

    Search for "Linked Servers" and "Openquery".

    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: View referencing table with ## in the name?

    Reactions like this make me wonder if I should change my signature.

    Those questions are there because some people just copy, paste and execute code without analysing what they do. I'm...

    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: View referencing table with ## in the name?

    Synonyms?

    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?

    Brandie Tarvin (5/20/2015)


    Grant Fritchey (5/20/2015)


    Again...

    AAARRARARRGGGGHHHH!!!

    Sometimes, I just wonder why any of us even try. Reams of good advice from multiple people. All of it ignored. Apply a random query hint....

    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: Help fro interview question

    If you want a database environment to practice, download and install SQL Server in your local computer and then install Adventureworks databases. Many sites use them for examples (the main...

    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?

    Grant Fritchey (5/20/2015)


    Ed Wagner (5/20/2015)


    Brandie Tarvin (5/20/2015)


    Grant Fritchey (5/20/2015)


    AAAAAARRRRRRGGGGGGGHGHGHGHGHGHGH!!!!

    Dare we ask?

    How about a link? You're normally so patient that it ought to be good. 😛

    We've been beating this person...

    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: Skipping group with FOR XML Path('')

    pdanes (5/20/2015)


    Thanks, I've looked at them. Interesting results - an order of magnitude difference from the slowest to fastest.

    This might be caused by the safer method, as Dwain 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: Replace Statement

    You don't need a subquery. I did it like that to have some sample data without creating a table.

    SELECT IPAddress,

    PARSENAME(ipaddress, 4) + '.' + PARSENAME(IPAddress, 3) + '.' + PARSENAME(IPAddress,...

    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 Statement

    TJT (5/19/2015)


    Sorry, I should have provided more information. The IP Addresses could be any IP addresses.

    I was trying to use REPLACE with RIGHT statement

    The solutions posted will work 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: Selecting days in month between two dates

    And an example on how to use it with a table.

    DECLARE @Sample TABLE(

    FileNumb int,

    startdate date,

    enddate date);

    INSERT INTO...

    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: Selecting days in month between two dates

    You could create a function that uses a calendar table.

    Here's an example.

    CREATE FUNCTION DaysBetweenInMonths(

    @StartDate date,

    @EndDate date

    )RETURNS TABLE WITH SCHEMABINDING

    AS

    RETURN

    WITH E 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: Replace Statement

    Alan.B (5/19/2015)


    You could do this:

    DECLARE @ipaddresses TABLE (ip varchar(30));

    INSERT @ipaddresses VALUES

    ('175.139.45.127'),

    ('175.139.45.12'),

    ('175.139.45.1'),

    ('10.10.10.100'),

    ('10.10.10.10'),

    ('10.10.10.1');

    SELECT ip = PARSENAME(ip,1)+'.'+PARSENAME(ip,2)+'.'+PARSENAME(ip,3)+'.0'

    FROM @ipaddresses

    Alan, that's cheating. You didn't test your code. 😛

    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 Statement

    These are a few options to do what you're asking for.

    SELECT ipaddress,

    PARSENAME(ipaddress, 4) + '.' + PARSENAME(ipaddress, 3) + '.' + PARSENAME(ipaddress, 2) + '.0',

    ...

    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 correct this?

    Instead of VAL, you should use CAST or CONVERT.

    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 - 4,906 through 4,920 (of 8,731 total)