Forum Replies Created

Viewing 15 posts - 646 through 660 (of 1,346 total)

  • RE: Import text file from another server

    Yes Possible using DTS.

    For a good resource on DTS Stuff.

    Go to DTS.com and there's a few tutorials you can look at.

    http://www.sqldts.com/?1

  • RE: parsing data

    Oh, just put in your where clause

     

    select substring(Field,patindex('%[0-9][0-9][0-9]%', Field),3)

    from #t1

    where patindex('%[0-9][0-9][0-9]%', Field) > 0

     

    cheers

  • RE: datetime datatype problem

    getdate is a function and requires the '()' to execute

    select getdate () -- works

    select getdate -- fails

    also you cannot use getdate() as a value for an in parameter.

    exec add_dependent  getdate(),...

  • RE: "select into" must yield a table that allows nulls...

    Your choices are either

    A) Build the schema prior to inserting your records which includes declaring datatype, and nullability.

    B) Create table as you are, then editing the table to allow...

  • RE: parsing data

    Nevermind,

    its still very easy.

    -- drop table #t1

    create table #t1 (pk int identity, Field varchar(100))

    insert into #t1 (Field)

    select 'xxxxxxxxxxxxxx(xxx-xxx-xxx-120-xxx)' union

    select 'xxxxxxxxxxxxxxxxxx(xxx-xxx-xxx-xxx-455-x)' union

    select 'xxxxxxxxxxxxxxxx(xxx-5xx-xxxx-128-).'union

    select 'xxxxx66xxxxxxxx(x6x-5xx-5xxx-333-)' union

    select 'xxxxx66xxxxxxxx(x6x-5xx-5xxx-023-)'

    select substring(Field,patindex('%[0-9][0-9][0-9]%', Field),3)

    from #t1

    Returns

    023

    333

    120

    128

    Note this only...

  • RE: Selecting the TOP x rows less one

    Sometimes you can't see the forest because of those damn trees.

  • RE: Rebuilding Indexes

    No, definatelly keep it on a different drive.

    This will also help performance.

    Your distributing your data across drives which will help accessing the data a little quicker. (Indexes are data about...

  • RE: Selecting the TOP x rows less one

    Something like this?

    select top 6 myfield

    from mytable

    where mytable.myfield <> (select max(myfield)

                              from mytable)

    order by myfield

     

  • RE: parsing data

    Need more information.

    are the characters you indicate by an x, are they always Alpha characters? not numbers, if so its easy.

    If not, then how would you know what numbers to...

  • RE: Value Associated with the Maximum of another column

    I wrote it this way, but there are several ways to do it.

    subqueries, and or dervied tables really are the only way to do these types of queries.

    select *

    from Testtable...

  • RE: Rebuilding Indexes

    You'll need to get additional disk space somehow.

    Add another drive, and create a filegroup, and file on the new drive, and create your indexes on that new filegroup.

    You didn't say,...

  • RE: Dependencies

    Try this.

    there as another post that is similar to this but I don't know the whole answer

    select so.name

    from syscomments sc

    join sysobjects so on sc.id = so.id

    where sc.text like '%Mytable%'

     

  • RE: userDefined Function-Pls guide

    Need Parens around the @sql param.

    create PROCEDURE IsEffective

    (        

             

              @WhereClause varchar(1000)

    )

    AS

     

      DECLARE @sql nvarchar(2000)

                  SET @sql = ''

                 IF @WhereClause !=''

                  BEGIN

     SET @sql =  'Select  InDate,AccountID,OutDate From...

  • RE: userDefined Function-Pls guide

    What is the error?

    [Microsoft][ODBC SQL Server Driver]Syntax error or access violation

    This is caused because you are using curly braces instead of () parenthesis.

    Second,

    You cannot use exec or any other...

  • RE: How to speed up initial report.

    There is no way I can tell to Optimize the report rendering.

    It is likely that the first time the report is run the data is NOT Cached, so it must...

Viewing 15 posts - 646 through 660 (of 1,346 total)