Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 3,233 total)

  • RE: How to call/execute functions create by users

    Make sure you grant permissions on your function first.

    declare @SQLBuild nvarchar(20)

    set @SQLBuild = dbo.fnGetSQLBuild()

    print @SQLBuild

  • RE: SQL Syntax question -

    When you use the GROUP BY clause, all columns not included in the GROUP BY must be aggregate values.  GROUP BY tells SQL Server that you want to display only...

  • RE: Write triggers not to truncate table

    Ah, thanks for the clarification.  I don't believe that you can do what you are after with a trigger.  Use permissions to handle this.  If you do not grant a...

  • RE: Write triggers not to truncate table

    A trigger will not truncate a table unless it is explicity coded to do so.  A trigger is basically a glorified stored procedure.  If you want help writing a trigger, you...

  • RE: create database error

    It appears that you have one or more processes logged into the MODEL database.  Look at sp_who2 or in EM at current activity and find out who or what is...

  • RE: Passing Variables down the Sub-subqueries

    You will get more effective help if you submit your SQL code.  It is hard to determine exactly what is causing your error if we do not know what your...

  • RE: How to filter blank test data output with query profiler

    Save your trace to a table and query the data.

    select *

    from <trace Table>

    where eventclass = 40

        and textdata like 'update hsi.plattertable%'

  • RE: Issue with a DTS Package

    Well, I would start with finding out what else is running on your server during the night time run.  Check your backup and maintenance schedule.  Look in the Windows event...

  • RE: What can I do to help my Memory Situation

    With only 4GB of memory, you will not be able to use AWE.  Look at the /3GB switch in the link that David provided.  Keep in mind that this will...

  • RE: Grouping / Tying multiple queries together

    This would be much easier if you could post the table DDL for your temp table and some sample data, but here goes a shot anyway....

    Select Class,

        SUM(Volume) 'Total_ALL',...

  • RE: Need help with a loop adding time to a date

    If you truely only want the time only, you should make your datatype a varchar/char, but here is the solution if you stick to smalldatetime.

    SET NOCOUNT ON

    DECLARE @Date datetime

    SET @Date...

  • RE: Need help with a SQL query (return count value)

    Just change the WHERE clause to:

    WHERE COALESCE(derived_table.Status,'UNACCPT') = 'UNACCEPT'

  • RE: Need help with a SQL query (return count value)

    SELECT COUNT(*)

    FROM Product_T P

        LEFT JOIN (SELECT A1.ID,

                    A1.Prod_Num,

                    A1.Status

                    FROM Audit_T A1

                        INNER JOIN (SELECT Prod_num,

                                    MAX(Last_Updated_Date) as Last_Updated_Date

                                    FROM Audit_T

                                    GROUP BY Prod_Num) A2

                        ON A1.Prod_Num...

  • RE: Variable in Nested Query

    I'm a litte confused.  In your sub-query, you have FirstTableID = ID in the first part of the SELECT.  Well the ID in the first part of the SELECT is...

  • RE: parameter

    A parameter's scope is only good for the stored procedure that it is passed into.  It has the same scope as a local variable.  The only way to get it...

Viewing 15 posts - 2,701 through 2,715 (of 3,233 total)