Forum Replies Created

Viewing 15 posts - 2,851 through 2,865 (of 3,957 total)

  • RE: SQL help

    vinu512 (9/6/2012)


    dwain.c (9/5/2012)


    woody_rd (9/5/2012)


    Kind of odd, that query returns 0 results.

    To which query do you refer? Mine returns 2 rows:

    EventID

    1

    2

    May be the OP means that when he applied your...

  • RE: Data type Conversion

    I am not 100% sure what you mean because I can't reproduce what you're saying, but maybe one of these will help you?

    DECLARE @t TABLE (PremiumValue INT, PV MONEY)

    INSERT INTO...

  • RE: Subtracting Value

    Last time I checked my statistics book SUM/COUNT = AVG, so allowing for the fact that some IDs may not exist in one table or the other, I will propose...

  • RE: Order by a column keeping the families together

    You can try this. It might work for you but without more test data it's difficult to be sure.

    DECLARE @TableA TABLE (ItemID INT, Date DATETIME)

    DECLARE @TableB TABLE (ItemID INT,...

  • RE: string manipulation - Need help !

    So in other words, the string always contains the same roles (or a subset of them) and the ordering of the output result is always fixed and not based on...

  • RE: SQL help

    woody_rd (9/5/2012)


    Kind of odd, that query returns 0 results.

    To which query do you refer? Mine returns 2 rows:

    EventID

    1

    2

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (9/5/2012)


    L' Eomot Inversé (9/5/2012)


    Brandie Tarvin (9/5/2012)


    Steve Jones - SSC Editor (9/4/2012)


    OK, not my day. Not sure how to break the news here that this person is in way,...

  • RE: SQL help

    Being kind today and setting up your sample data for you, perhaps something like this might do the trick?

    DECLARE @t TABLE (EventID INT, ProcessDate DATETIME, TypeID VARCHAR(2))

    INSERT INTO @t

    SELECT 1,...

  • RE: string manipulation - Need help !

    vinu512 (9/5/2012)


    ohhh!!!! yes!!....i didn't look at the logic that way...that completely missed my eye. Sorry, My Bad. I was in a hurry, I just saw the OP's post and replied...

  • RE: string manipulation - Need help !

    vinu512 (9/5/2012)


    You can use a lot of methods to do this. It all depends on what part of the String you want to remove, the type of requirement(one time or...

  • RE: Get incremental numbers from char string(005 through 020)

    You can also dispense with the string split and do it with just a tally table like this:

    ;WITH MyTemp AS (

    SELECT SECTION,...

  • RE: Generation of Records

    Just a guess, but if you divide 5000/31 and add that result up 31 times, it won't equal 5000 when you're through.

    If you need it to, you can consult this...

  • RE: string manipulation - Need help !

    I agree that a string splitter combined with putting it all back together using FOR XML TYPE is the way to go:

    DECLARE @pString VARCHAR(MAX) = 'BUILTIN\ADMINISTRATORS: [System Admin]YES;[Security Admin];[Server Admin];[setup...

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    SQL Kiwi (9/4/2012)


    Blog post is up: http://bit.ly/ComputeScalar

    That is a great explanation of the behavior Paul!

    I wish I understood more about query plans, so I could dig into them as you...

  • RE: Comparision of a datetime variable against a column of the type nvarchar

    ISDATE is sensitive to DATEFORMAT (Google "SQL DATEFORMAT"), so that could be your problem.

    Personally I don't think I'd use it. Perhaps constructing a test (maybe a FUNCTION) for the...

Viewing 15 posts - 2,851 through 2,865 (of 3,957 total)