Forum Replies Created

Viewing 15 posts - 76 through 90 (of 154 total)

  • RE: retrieving NULL values with 'XYZ' in clauses

    Benoit ,

    the best way to go about this would be using

    ((Col <> 'XYZ' ) AND (Col IS NULL)) in the where clause

    this would utilize any indexes on the Column

    ISNULL...

  • RE: xp_sendmail procedure in a Job

    are you running service pack 2

    there have been some issues with sqlmap70.dll in sp 2

    if you are running sp 2 replace this dll with the SP 1 version

    ...

  • RE: xp_sendmail procedure in a Job

    what version of SQL do use use .. which sp??

  • RE: Modifying column by using T_SQL

    doesnt this work

    ALTER TABLE <Table>

    ALTER COLUMN <Column> varchar(2000)

    plain and simple!!!

  • RE: Image as Output from Stored Procedure

    oh yes , you can't assign to a text variable ... makes it virtually useless i guess ... you can write "select c2 from test" instead which would return the...

  • RE: Text vs Image

    depends on what you want to do !! if you want to store the HTML file in binary then you would use image...if you want to just store the HTML...

  • RE: Image as Output from Stored Procedure

    doesnt this work

    CREATE PROCEDURE <Proc Name> @Var text OUTPUT

    AS

  • RE: UDF

    Passing a table variable to a UDF as a parameter is not possible , though i think this is a much needed feature

  • RE: Front-end for Sql server - What's best?

    try powerbuilder

    i've done programming in both VB and PB.IMHO developing in PB is a lot faster than VB , plus compatibility with SQL is no issue and you do...

  • RE: selecting a set of records by rank

    you can use the SET ROWCOUNT command to return a variable number of rows however your query requires a range lookup !! i.e (BETWEEN) so i don't think the top...

  • RE: Comparing rows in select stmt

    here's extending the query a bit

    SELECT *

    FROMTABLE1

    INNER JOINTABLE2

    ON TABLE2.claimID = TABLE1.claimID AND

    TABLE2.recdDate = TABLE1.recdDate AND

    TABLE2.recdTime = TABLE1.recdTime

    INNER JOINTABLE3

    ONTABLE2.claimID = TABLE3.claimID AND

    TABLE2.recdDate = TABLE3.recdDate AND

    TABLE2.recdTime = TABLE3.recdTime AND

    TABLE2.DetailLn =...

  • RE: Assigning a variable

    does this work

    SELECT @greet1 = Score1,

    @greet2 = score2,

    @greet3 = score3,

    ...

  • RE: Query to retrieve top records

    aahhh...missed that ..however Antares i've not just changed the > operator but this subquery SELECT ISNULL(SUM(AMT),0) FROM SL iT WHERE iT.SL_NO < oT.SL_NO

    notice i'm using the SL_NO rather than the...

  • RE: Query to retrieve top records

    Excellent solution Antares..however the i think the calculation for cumulative should be slightly different...here's my take on your query

    SELECT

    *

    FROM

    (

    SELECT

    SL_No,

    ITEMCODE,

    AMT,

    AMT + (SELECT ISNULL(SUM(AMT),0) FROM SL iT WHERE iT.SL_NO <...

  • RE: SQL Function

    here's a simple recursion that lists all the parts which are descendents to a part_id

    DECLARE @Parts TABLE

    (

    Colidint identity,

    Part_idint,

    Part_novarchar(10),

    Parent_idint

    )

    DECLARE @Colidint

    DECLARE @PartIdint

    SET @Partid = 1--Parameter passed

    SET @Colid = 1

    INSERT INTO @Parts

    SELECT Part_id,Part_no,@Partid

    FROM...

Viewing 15 posts - 76 through 90 (of 154 total)