Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 1,131 total)

  • RE: Counting a consecutive condition

    This solution may be easier to understand and handles those cases where there are gaps in the employee objective dates.

    select EmployeeObjectiveStatus.EmployeeID

    fromdbo.EmployeeObjectiveStatus

    where EmployeeObjectiveStatus.ObjectiveDate= '2005-01-06'

    andEmployeeObjectiveStatus.MetInd= 'Y'

    and4 = -- All 4 prior...

  • RE: Challenge for SQL Gurus: Grouping and outer joins

    create table #xref ( xref int, name nvarchar(32))

    create table #data (group1 nvarchar(32),group2 nvarchar(32),xref int,value1 int,value2 int)

    insert into #xref (xref, name) values (1, 'X1')

    insert into #xref (xref, name) values (2, 'X2')

    insert...

  • RE: ''''Set linesize'''' equivalent

    If you are attemping to use isql.exe (the equivalent of SQLPlus), see the Books On Line documentation for the command switchs such as listed below.

    If you are attempting to write...

  • RE: Recompile to enhance Optimizer Access Path?

    SQL Server does perform "parameter sniffing" whereby the values of the parameters are passed to the query optimizer to generate the execution plan.  Without the recompile parameter, the  stored procedure...

  • RE: Script running forever.....Help

    As PW advised, having table access in UDF will be extremely slow. Recommend that all table access be outside of the UDF and use the columns as parameters to...

  • RE: How to display the 4 most happened values in a table by a SQL statement

    Please post create table and insert statements.

    create table MyTable

    ( Value1 INT, Value2 INT, Value3 INT, Value4 INT )

    go

    insert into MyTable

    (Value1 , Value2 , Value3 , Value4 )

    select ...

  • RE: SP execution plans going bad?

    See the thread on "Stored Proc vs Query" http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=166363#bm166984

    What may be happening is:

    1. SP executes for first time with particular parameter values that make the optimal plan...

  • RE: SQLMAINT utility

    If a permission is denied from a SQL Server role or a Windows NT group, the permission affects all logins that are members of the group or role, regardless of...

  • RE: Update question

    A single SQL statement can reference the same table more than once as long as each reference assigns a unique name. For example:

    from EmployeePayroll as EmployeePayroll_One

    join EmployeePayroll...

  • RE: SQLMAINT utility

    As maintenance plans always run under the SQL Server Agent Login and you cannot specify a Login and Password, your options are limited.

    Instead of maintenance plans, you could invoke...

  • RE: dijkstra shortest path or similar routing algorithm

    Based on experience, I suggest you do NOT do this in SQL !!! 

    Recommend that you use a a programiing language (C++/C/Vb?) where you should load the data into in-memory arrays/lists/whatever and...

  • RE: Stored Proc vs Query

    <

    First create the stored procedure that will create and execute another stored procedure.  This is where you'll supply your parameters.

    >

    If your intent is to force a new execution plan for...

  • RE: Online Repair and Recovery

    To determine if there are space allocation or structural integrity problems,  Database Command Console (DBCC) command.  There are 6 commands that determine the granularity of the checking such as CHECKTABLE for...

  • RE: sp_executesql help

    See "Arrays and Lists in SQL Server" by Erland Sommarskog (SQL Server MVP) at http://www.sommarskog.se/arrays-in-sql.html

  • RE: Conversion Help

    In SQL Server terms, you have been given a .mdf file.

    You will need to install the Watcom DBMS software first before you can begin.

    You could try installing the latest version...

Viewing 15 posts - 1,096 through 1,110 (of 1,131 total)