Forum Replies Created

Viewing 15 posts - 91 through 105 (of 321 total)

  • RE: Lock Timeout Alert

    You have 2 different errors:

    1 is for your Lock Timeout (first with the QA)

    2 is for you query timeout (time allowed for a query to finish) which seems in your...

  • RE: DTS Lookups

    On the new server where you want to put the DTS packages add as LinkedServer the server that you wish your lookup to connect to using

    sp_addlinkedserver or EM

     

  • RE: import datetime conversion problem.

    STUFF is in BOL

    you need to run the STEP ONCE

    if you want you can add the transformation after your import

    "UPDATE MyTable SET myStringDate=STUFF(STUFF(STUFF(LEFT(myStringDate,23),11,1 ,' '),14,1,':'),17,1,':')"

     

    since I...

  • RE: conditional statement

    select * from @t

    where

    CASE WHEN a > 3 THEN 1 ELSE 0 END+

    CASE WHEN b < 70 THEN 1 ELSE 0 END+

    CASE WHEN e = 9001 THEN 1 ELSE...

  • RE: import datetime conversion problem.

    DECLARE @testDate AS DATETIME

    DECLARE @stringDate AS VARCHAR(25)

    SET @StringDate='2006-05-11-16.29.43.882000'

    SET @StringDate=STUFF(STUFF(STUFF(LEFT(@StringDate,23),11,1 ,' '),14,1,':'),17,1,':')

    PRINT @StringDate

    SET @testDate=@StringDate

    PRINT @testDate

    --you can run after import

    --UPDATE MyTable SET myStringDate=STUFF(STUFF(STUFF(LEFT(myStringDate,23),11,1 ,' '),14,1,':'),17,1,':')

    --and you can change the datatype

     

  • RE: Configuring SQL Mail

    The SQL Service, SQL Agent must START under a domain account that HAS a mail profile on server.

  • RE: DTS Lookups

    have you changed the connections to point to right servers?

  • RE: Distribute tables between multiple file groups

    BOL -- partitioned views

  • RE: Best method to virtually combine tables

    declare @tbl1 table (ID int, data1 varchar(10),data2 varchar(10))

    declare @tbl2 table (ID int, data1 varchar(10),data2 varchar(10))

    declare @tbl3 table (ID int, data1 varchar(10),data2 varchar(10))

    INSERT INTO @tbl1

    SELECT 0,'0','0' UNION ALL

    SELECT 1,'1','1' UNION...

  • RE: Distribute tables between multiple file groups

     

    "

    Microsoft® SQL Server™ 2000 allows you to create tables or indexes on a specific filegroup within your database, rather than across all filegroups in a...

  • RE: FROM OPENDATASOURCE with csv file

    You ll have to use a different driver to connect to csv file.

    This is new command :

    select * from OpenRowset('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=C:\Temp;Extended properties=''ColNameHeader=True;Format=CSVDelimited;''','select * from Test.csv')

     

    If...

  • RE: prompting for values when opening a view

    Stored Procedures might help you : )

    SQL Server <> Access

     

     

  • RE: Is it posible to have 2 or more column in a single constraint

    < column_definition > ::=

        { column_name data_type }

        [ [ DEFAULT constant_expression ] [ WITH VALUES ]

        | [ IDENTITY [ (seed , increment ) [ NOT FOR...

  • RE: weekly report

    --this is a NUMBERS table

    ------------------------------------------------

    DECLARE @MyTable TABLE(Col1 int)

    DECLARE @i int

    SET @i=1

    WHILE @i<31

    BEGIN

     INSERT INTO @MyTable(col1) VALUES( @i)

     SET @I=@i+1

    END

    -------------------------------------------------

     

    --report generating query

    DECLARE @StartDay datetime

    SET @StartDay='1/1/2006'

    SELECT StudentID , Col1,SUM(noOfHours)

    FROM test1.dbo.hours,@MyTable

    WHERE DATEDIFF(wk,@StartDay,[date])<=Col1 and COL1<=DATEDIFF(wk,@StartDAy,GETDATE())+1

    GROUP...

  • RE: Is it posible to have 2 or more column in a single constraint

    Yes is possible to have 2 or more colums in one constraint (table constraints)

    CREATE TABLE [dbo].[TestTBL] (

     [Col1] [int] NULL ,

     [Col2] [int] NULL ,

     [Col3] [int] NULL

    ) ON [PRIMARY]

    GO

    ALTER TABLE [dbo].[TestTBL]...

Viewing 15 posts - 91 through 105 (of 321 total)