Forum Replies Created

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

  • RE: Stored Procedures Local vs. Cloud

    Search for "Linked Servers" and "Openquery".

  • 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...

  • RE: View referencing table with ## in the name?

    Synonyms?

  • 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....

  • 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...

  • 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...

  • 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...

  • 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,...

  • 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...

  • 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...

  • 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(

    ...

  • 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. 😛

  • 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',

    ...

  • RE: How to correct this?

    Instead of VAL, you should use CAST or CONVERT.

  • RE: Here are some SQL Server Interview Questions

    SQLRNNR (5/19/2015)


    Along the lines of interview questions, let's just throw this question out there.

    If you are hiring for a senior position, you create an exam for the position, you require...

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