Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Sabnac

    How to find if Agent is runing

    on each servers I have created a job that send a mail to a choosen master server (nearest of my office). This mail contains a statement that update a status table (srv_name, status, date) On the main server I update my status table setting all switch to 0. On the "main" server i...
  2. Sabnac

    dynamic table creation (table name as variable)

    Create the stmt into a nvarchar variable and use the sp_executesql Declare @stmt nvarchar(2500) Set @stmt = 'SELECT * INTO' + @Tablename + 'CAST(@COUNT AS VARCAHR(5)) FROM MyTable WHERE MyCol1=100 + ' + @Count sp_executesql @stmt
  3. Sabnac

    SQL Server Timeouts, Network issues?

    Have you check for SQLSlammer infection ?
  4. Sabnac

    Help with conditional selections.

    SELECT 'Result1' = case when getdate() between '2003-01-01' and '2003-09-30' then F3 when getdate() between '2003-05-01' and '2003-09-30' then F6 else F9 end, 'Result2' = case when getdate() between '2003-01-01' and '2003-09-30' then F4 when...
  5. Sabnac

    Online Access...Slow!! Help pls

    Merge replication seems to be adapted. Snapshots for each servers will be merge in th evening (or when you want). Just take a look on replication in BOL
  6. Sabnac

    Loading a text file with 3 fields into a table with 4 fields

    Just look here : http://doc.ddart.net/mssql/sql2000/html/adminsql/ad_impt_bcp_57qd.htm
  7. Sabnac

    Multiple Increment fields

    From BOL : IDENTITY Indicates that the new column is an identity column. When a new row is added to the table, Microsoft® SQL Server™ provides a unique, incremental value for the column. Identity columns are commonly used in conjunction with PRIMARY KEY constraints to serve as the unique row...
  8. Sabnac

    Trigger advice

    To backup your db use scheduled jobs or maintenance plan. To retrieve datetime use the getdate() function
  9. Sabnac

    single_user/multi_user question

    For each kill a rollback is initiated. To kill connections i use a SP created in master CREATE PROC Kill_Connections (@dbName varchar(128)) as DECLARE @ProcessId varchar(4) DECLARE CurrentProcesses SCROLL CURSOR FOR select spid from sysprocesses where dbid = (select dbid from sysdatabases...
  10. Sabnac

    top question

    SELECT * FROM CALL_LOG WHERE ID IN (SELECT TOP 50 ID FROM CALL_LOG ORDER BY ID DESC) ORDER BY ID
  11. Sabnac

    problems with attachments field in xp_sendmail

    i just test a mail with an attachement greater than varchar(700) with n times the \\issrv001\ftp_data_ares\ares\ft kms\out\KMS.zip file attached. It works. Just do a print of @fileattachment before executing the xp_sendmail to be sure of the content.
  12. Sabnac

    problems with attachments field in xp_sendmail

    Maybe @fileattachments is truncated (200+200+200 = 600) Set @fileattachments varchar((600)
  13. Sabnac

    problems with attachments field in xp_sendmail

    Delete the last semicolon set @manual = '\\austen\Documents\reports\ALife_inbound\exportfiles\exports' + replace(convert(varchar,getdate()-1,03),'/','') + '\Without Policy Details ' + left(replace(convert(varchar,getdate()-1,03),'/',''),4) + '.xls'
  14. Sabnac

    How to start SQL SP3

    unpacked-drive\sql2ksp3\x86\setup\setupsql.exe
  15. Sabnac

    Tables in SQL

    Use Sysobjects, syscolumns, systypes, ... system tables or associated views (INFORMATION_SCHEMA.)
  16. Sabnac

    Inser new column into existing Table in SQL database

    ALTER TABLE will works perfectly. From BOL : A. Alter a table to add a new column This example adds a column that allows null values and has no values provided through a DEFAULT definition. Each row will have a NULL in the new column. CREATE TABLE doc_exa ( column_a INT) GO ALTER TABLE...
  17. Sabnac

    Please, important: group by

    Group by @Vertice1 not @vetice1 But put the error message it will be easier to help you
  18. Sabnac

    How to convert char col to bool?

    Use an update for the whole table. Update table1 set column1 = 0 where column1 = 'y'
  19. Sabnac

    I want to select top 10 distinct exposureids

    In this case, you will have the distinct value of the 10 top rows. If the top 10 rows are the same you will get 1 rows. Try this : SELECT TOP 10 exposureid FROM iinstrumentid GROUP BY exposureid
  20. Sabnac

    SQLMAIL

    Are you sure you have last SP and outlook 2000 installed ?

Part and Inventory Search

Back
Top