Forum Replies Created

Viewing 15 posts - 3,781 through 3,795 (of 15,381 total)

  • RE: round the value to the nearest

    Smash125 (9/19/2014)


    LEFT(CAST(ROUND([Val],0,0) as nvarchar(10)),2) + '%' AS [val]

    to get the results some like this

    34.100 34.000 ->34%

    39.800 40.000 ->40%

    35.400 35.000 ->35%

    But this does not holds...

  • RE: View changing but not able to capture who/what is doing it

    phingers (9/19/2014)


    I completely agree, but I the support company I work for have only one login to this customer, and they will not create separate ones for each user...

  • RE: Insert / Update / Delete them from another DB Instance

    The biggest problem you have is that your trigger cannot handle multiple row operations. You are setting a scalar value from inserted. If an update affects more than 1 row...

  • RE: Remote table-valued function calls are not allowed

    up.sivakumar (9/19/2014)


    SELECT MAX(ID)

    FROM [LinkedServer].[Database].dbo.[TableName] (NOLOCK)

    WHERE <Condition>

    The above SQL Script ran successfully up to yesterday. But today its throws the below error message.

    Remote table-valued function calls are not...

  • RE: COMPLEX DATA QUERY

    Awesome job posting sample data and ddl. The challenge I see is that you didn't post enough data. Following your business rules:

    --Now that the data is loaded, I need to...

  • RE: Calculating 30 days of each month

    waseemshaikh345 (9/18/2014)


    Maby my select statement might help. So I am trying to see how many contracts are purchased for every month. And if its Feburary than up to the 28th...

  • RE: Union in view with 2 different fields

    Robert Vogelezang (9/18/2014)


    My goodness, that simple!

    Thanks!

    No problem. Glad that worked for you and thanks for letting me know.

  • RE: Union in view with 2 different fields

    Are you thinking that somehow your view has two columns or two names? When you use UNION or UNION ALL (which if probably more appropriate here) the column name will...

  • RE: Union in view with 2 different fields

    Robert Vogelezang (9/18/2014)


    Thanks for your reply. Maybe I have not explained my problem good enough.

    I'll try again.

    I have two tables:

    warehouses

    warehouse (pk)

    departments

    department (pk)

    create view as

    select warehouse from warehouses...

  • RE: Calculating 30 days of each month

    waseemshaikh345 (9/18/2014)


    Like for example lets say I Have 14 people who made payments to their account, I want to know in those 30 days of September how many people payed...

  • RE: Union in view with 2 different fields

    Robert Vogelezang (9/18/2014)


    I have two tables (warehouses and departments) that have warehouse and department as primary key fields.

    The view (1) below selects all warehouses and departments.

    In 2 I want...

  • RE: Calculating 30 days of each month

    waseemshaikh345 (9/18/2014)


    Hello everyone,

    I am trying to create a report that shows how many accounts have been payed in the past 30 days of every month and year. I have already...

  • RE: Counting with Where clauses

    Ryan Keast (9/18/2014)


    Sorry Sean - just find it hard to explain myself and sorry my formatting is poor.

    I'm not a natural at all of this as no one has...

  • RE: Counting with Where clauses

    Let's start with some formatting so that query is legible.

    SELECT COUNT(C.[Place Referance]) AS [April Total Voids]

    FROM (

    SELECT DISTINCT TOP 100 PERCENT HIST.[PLACE-REF] AS 'Place Referance'

    ,PLA.[address1] AS 'Address Line1'

    ,HIST.[START-DATE] AS 'Void...

  • RE: Query to compare two databases

    Priya004 (9/18/2014)


    Hi,

    Need a query to compre two database schemas.

    I have seen lot of comparision tools but need a query.

    Thanks

    The reason there are tools is because you can't do this with...

Viewing 15 posts - 3,781 through 3,795 (of 15,381 total)