Forum Replies Created

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

  • RE: Converting to int and aggregating at the same time

    Vladan,

    I does know that there are known issues with ISNUMERIC fn & i forgot to mention it..

    Since 'D' & 'E' are valid formats for representing floating point numbers in Fortran...

  • RE: Converting to int and aggregating at the same time

    a little better....

     

    SUM((CASE WHEN ISNUMERIC(P.Col006) = 1 THEN CAST(P.Col006 AS INT) ELSE 0 END))

  • RE: Copy data from MS SQL Server dbtable to Oracle dbtable

    Probably a syntax error...

    INSERT INTO OPENQUERY(OLEOracle, 'select Field_1,Field_2,Field_3 from SCHEMA.TABLE1')

    SELECT [Field_1],[Field_2],[Field_3] from TABLE1

  • RE: query problem

    very simple....

    select (case when charindex(' ',name) > 0 then substring(name,1,charindex(' ',name)) else name end) from your_table

     

     

  • RE: Select Int to char, two tables

    Alan,

    here is this......

    CREATE TABLE Table1_Users

    (

     UserID INT NOT NULL PRIMARY KEY CLUSTERED,

     UserName VARCHAR(20) NOT NULL

    )

    CREATE TABLE Table2_Event

    (

     EventName CHAR(20) NOT NULL,

     RequestBy INT NOT NULL REFERENCES Table1_Users(UserID) ,

     OwnedBy INT NOT NULL REFERENCES Table1_Users(UserID)...

  • RE: Help with Logic

    You can use

    set @searchterms = SUBSTRING(@Searchterms,@Spaceat,len((@Searchterms)))

    instead of

    set @searchterms= replace(@searchterms, SUBSTRING(@Searchterms,1,@Spaceat),'')

     

     

  • RE: Dynamic Queries in UDF

    Daniel,

    As per BOL, only extended stored procedures & functions can be executed from within a function.  Functions cannot change the state of the database (DML statements), they just act as...

  • RE: Transactions in Transform Data Task of DTS

    Sergiy,

    I posted this thread in this forum only because this forum is very active & secondly there isn't any forum dedicated to DTS in SSC.

     

  • RE: Transactions in Transform Data Task of DTS

    .........VBScript

  • RE: SP resultset to a table

    Let me give some more information about the thread... 

    Currently, we're having an SP which gives us paged data by dynamically building the SQL.  This SP takes table name , column...

  • RE: Cross Tab Question

    Thanks jeff for the appreciation....

  • RE: Stored procedure resultset to a new table

    In our application we have several SPs to get data from views/tables & then get the resultset in a data table & pass the required information to this SP which...

  • RE: Cross Tab Question

    CS,

    I've a sample sp which may help you....

    CREATE PROCEDURE [DBO].[CrossTab]

     @Select VarChar(8000),

     @SumFunc VarChar(1000),

     @Pivot VarChar(100),

     @Table VarChar(100)

    AS

     DECLARE @Delim VarChar(1)

     DECLARE @mSQL1 VarChar(8000), @mSQL2 VarChar(8000), @mSQL3 VarChar(8000)

     DECLARE @mTmp VarChar(1000), @mTmp1 VarChar(1000), @mTmp2...

  • RE: How to get paged data using t-sql

    Jeff,

    The parameters used are

    @iPageNo   = Page Number to get (OPTIONAL)

    @iPageSize   = Page size (OPTIONAL)

    @strTableName   = Table name from where to get data

    @strSelectClause  = column list for the resultset  (OPTIONAL)

    @strWhereClause  = WHERE...

  • RE: How to get the identity column name of a table

    David,

    I'd used this one.. it is ok?

     

    SELECT @strIdentity = name FROM dbo.syscolumns WHERE id = OBJECT_ID( @strTableName ) AND colstat & 1 = 1

    --Ramesh

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