Forum Replies Created

Viewing 15 posts - 13,096 through 13,110 (of 13,457 total)

  • RE: turn time in excel into epoch time for sql server 2000

    note that the number of milliseconds will overflow an int value, so you've got to use a bigint datatype:

     

    declare @DateOfInterest datetime,

            @EpochDate datetime,

     @millisecs bigint

    set @DateOfInterest = '12/11/1962'

    set @EpochDate      = '1/1/1970...

  • RE: Use sp_MSforeachtable to gen COUNT(*) for each table in MyDBname

    how about this?

    sp_MSforeachtable @command1="select '?' AS TABLE_NAME,count(*) from ?"

    results:

    TABLE_NAME                  

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

    [dbo].[SFPORGLM] 0

    TABLE_NAME                 

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

    [dbo].[GMHOME1] 426

    etc.

  • RE: Sybase To SQL 200

    syntax-wise, it raises no errors in SQL Query Analyzer; the sybase statement needs no conversions to get it to be correct in SQL Server.

    without the data, i do not know...

  • RE: How to create a foreign key that points to a table in different database

    well i could see that you can add viewnames with the identical table names for each of the 450 lookup tables, and use them in your application, but that would...

  • RE: Print a report w/o opening

    older versions of Adobe reader supported a command line /t, so you could call acrord32.exe with the proper command line parameters in order to print and then kill adobe reader;

    this...

  • RE: How to create a foreign key that points to a table in different database

    cross database foreign keys are not possible; the best you can do is create a trigger that performs the logic to make sure the relationship exists that you are trying...

  • RE: Prompt for User Input to set variable

    not directly from TSQL, no; you'd have to write a program that would prompt for input, and then use the input in the sql to be performed;

    Oracle (or rather, SQL...

  • RE: SQL server alerts when database stops

    i learned a bit more myself; if you go to a command prompt and type net start the list of all services will be displayed;

    pretty much every service listed will...

  • RE: SQL server alerts when database stops

    hopefully someone else will chip in on how to alert the operators;

    all services on a server can be started and stopped with the NET START /NET STOP command:

  • RE: Getting different results from Query Analyser than Stored Procedure

    my bad;  in the rush to post, it's the wrong procname

    sp_recompile is the correct name;

  • RE: Identify column

    yes, it will get the next value; here's an example:

    create table #tmp (tmpid int identity(1,1) not null primary key,tmptext varchar(30) )

    insert into #tmp(tmptext) values('SQL')

    insert into #tmp(tmptext) values('SERVER')

    insert into #tmp(tmptext) values('ROCKS')

    set...

  • RE: Copy all immages out of SQL Server with TextCopy

    this should really be handled by a programming language and not SQL server.

    it's very easy, maybe 15 lines of code to loop thru a recordset and save the image to...

  • RE: Delete data

    you might want to consider adding a constraint to prevent the data from getting messed up in the future too:

    alter table sometable add constraint UQ_Custnbr_Email unique(Custnbr,  Email)

     

    you'd have to add...

  • RE: Suppressing Error messages in SP

    like Ken said, if the error is level 16 or above, (foreign key constraint,unique constraint, primary key for example) it cannot be capture via TSQL.

    use a different style of logic...

  • Viewing 15 posts - 13,096 through 13,110 (of 13,457 total)