Forum Replies Created

Viewing 15 posts - 8,341 through 8,355 (of 26,490 total)

  • RE: Assistance in converting INT into date.

    patrick.palmer (3/25/2013)


    I have a query that has two date fields that are Int....20050307. I need to convert them to date fields. 03/07/2005 I can not seem to get them to...

  • RE: Remove characters after last slash in string

    A bit expensive, but the following works:

    declare @string varchar (100)

    set @string = 'x:\folder1\folder2\folder3\test.txt'

    select @string

    select @string,reverse(right(reverse(@string), len(@string) - charindex('\',reverse(@string),1) + 1));

  • RE: Global System UDF to return ISO Date string

    I'm thinking this would work on SQL Server 2000 when you could update system tables.

  • RE: Alias / CTE alternative

    Without seeing the table structure, data, the different calculations that would be completed and what the data would look like when process was completed (the expected results), it is really...

  • RE: Check Data While Inserting

    I would look at using a check constraint instead of a trigger. Even if you implement the check in the UI, it should be in the database as well...

  • RE: Need help with Select statement!!

    Maybe I will look at this tomorrow.

  • RE: Need help with recursive query

    mishaluba (3/22/2013)


    Lynn,

    Thank you for your reply! The query you listed will return all of the cars and their parts, but this is not what I am after. My...

  • RE: Implementing RBAC

    The way I would start, is do the first one manually creating the scripts as I went along using SSMS. Then it is just a matter of automating those...

  • RE: Self Join Brings Too Many Records

    javib (3/22/2013)


    What I'm trying to accomplish here is to detect the instances where the same rep/hcp_cid combination appears at least twice in this violations table to flag the rep for...

  • RE: Need help with recursive query

    I don't see a need for a recursive query:

    IF OBJECT_ID('Car') IS NOT NULL DROP TABLE Car;

    CREATE TABLE Car (

    CarID INT,

    CarName VARCHAR(16)

    );

    IF OBJECT_ID('CarPart') IS NOT NULL DROP TABLE CarPart;

    CREATE TABLE CarPart...

  • RE: Implementing RBAC

    SQLCrazyCertified (3/22/2013)


    Steve Jones - SSC Editor (3/22/2013)


    You are right, I did. I was thinking row and misread that. I've seen RBAC mostly as row based, not role.

    In terms of roles,...

  • RE: create sql str with special condition

    Try this:

    select

    a.code,

    a.price,

    new_field = a.price * b.percent * case when a.check = 1 then 8 else 1 end

    from

    ...

  • RE: how create sql str with special condition

    Please, do not cross post, duplicate post. Please post all replies here.

  • RE: Count dots '.'

    davdam8 (3/22/2013)


    Thanks Sean,

    this is really helpfull.

    However all the specification you gave are very terrifying, i'm only a rookie.

    The work i'm in now requires the separation of the data into levels,...

  • RE: Self Join Brings Too Many Records

    javib (3/22/2013)


    I have this query to express a set of business rules.

    To get the information I need, I tried joining the table on itself but that brings back many...

Viewing 15 posts - 8,341 through 8,355 (of 26,490 total)