Forum Replies Created

Viewing 15 posts - 271 through 285 (of 1,344 total)

  • RE: Dynamic Proc

    Your not constructing your dynamic sql correctly.

    if you want to pass parameters into dynamic sql, then you MUST use sp_executesql. the EXEC function does not except parameters.

    If you do...

  • RE: COMPLEX STORE PROCEDURE

    Your desire to find companies within a certain distance of a given point is fairly simple on the surface,

    Your function is not correct tho. (I did not check your...

  • RE: Can't PARSE This STRING Guidance?

    Would this work?

    SELECT SUBSTRING(PK, Charindex('=',PK)+1 , (len(PK)-1)) FROM audit

    or you could wrap a replace..

    SELECT replace(SUBSTRING(PK, Charindex('=',PK)+1 , len(PK)),'>','') FROM audit

  • RE: Case, IF or something different

    What do you mean based off Previous AchieveLevel?

    Your talking about comparing values from two different rows?

    Please post sample data and desired output so we can see what your looking for..

    Thx

    😎

  • RE: Trigger

    There is no need/ way to integrate stored procedures with a trigger.

    For triggers you gain access to 2 virtual tables called "Inserted" and "Deleted"

    Inserted holds the data that is being...

  • RE: error

    What data type is the code column in your emp table?

    Please Post table definition.

    It is likely your code table is an int.

    Try

    Select jobid As job,

    CASE WHEN code in ('1','2','3') THEN...

  • RE: Indexing

    Richard Sabbara (10/6/2006)


    I need a quick on line refresher on Indexing, any idea where I can go? I finally have a need to build an index, just don't remember some...

  • RE: Conditional Formatting

    I am assuming your talking about reporting services.

    If not, please post and let us know.

    Give this article a read

    http://www.sqlservercentral.com/articles/Development/reportingservicesconditionalformatting/1423/

    Or this

    http://msdn2.microsoft.com/en-us/library/ms345242.aspx

  • RE: incorrect syntax for building a string

    :D, Just playin about the cursor,

    I don't think the error your getting has to do with the open query query, its coming from somewhere in the string.

    Either your string...

  • RE: Query top 1 of a set of records

    select A.*

    from BaseOutlet A

    join (select CaseId, OUTL_ID, MKT_ID, max(cast(TAC_ID as tinyint)) as TAC_ID

    from BaseOutlet

    group by CaseId, OUTL_ID,...

  • RE: Send .csv file automatically thru email

    If you have reporting services running, it is a good solution to do this.

    Thats what I Have done in this scenario

  • RE: incorrect syntax for building a string

    What size are your @SqlString parameters declared as?

    Try printing the @SQLString

    Print @SQLString and in the messages tab, copy and paste that into a new window and see if you can...

  • RE: TOP 10 Distinct rows

    select distinct top 10 CNO

    from MyTable

  • RE: COMPUTE results to variables?

    No,

    a second query is in order

    alter PROCEDURE TestProc

    @SumTotal money OUTPUT,

    @AvgTotal money OUTPUT

    AS

    SET NOCOUNT ON

    SELECT @SumTotal = Sum(LineTotal), @AvgTotal = Avg(LineTotal)

    FROM Sales.SalesOrderDetail

    SELECT SalesOrderID, LineTotal

    FROM Sales.SalesOrderDetail

  • RE: Report Layout

    What control are you using? the Table control?

    on each cell on the table control you can select the Cangrow Property and set it to false.

    That will maintain the layout...

Viewing 15 posts - 271 through 285 (of 1,344 total)