Forum Replies Created

Viewing 15 posts - 1,876 through 1,890 (of 3,221 total)

  • RE: date value diffrerence

    My former post was run PRIOR TO NOON. Following up on Michael Valentine Jones forum post ... running at

    2010-06-22 12:41:59.030 or after noon gives

    14782 and 14783. ...

  • RE: date value diffrerence

    select ((DateDiff("d",'01/01/1970', getdate())) * 1)

    select ((DateDiff("d",'01/01/1970', cast(getdate() as numeric) )) * 1)

    Results:

    (No column name)

    14782

    (No column name)

    14782

    When running on my SQL Server 2008 as you can see there is NOT a...

  • RE: Transaction Batch not working properly

    PLease be aware of: (From Books On Line)

    Because @@ERROR is cleared and reset on each statement executed, check it immediately following the statement being verified, or save it to a...

  • RE: Copy new foreign key number into another table using a trigger

    research-1077696

    Note that the T-SQL code that I posted using my assumption of your table structure, which of course is most likely incorrect in that I selected as the primary key...

  • RE: Copy new foreign key number into another table using a trigger

    Without a trigger you could:

    CREATE TABLE [dbo].[Table1]([Custid] [nchar](9) NOT NULL,[Cname] [nvarchar](75) NOT NULL,

    CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([Custid] ASC))

    CREATE TABLE [dbo].[Table2]([CTEID] [int] IDENTITY(1,1) NOT NULL,[CustId] [nchar](9) NOT NULL,

    CONSTRAINT...

  • RE: how to know which applicaton is using our sql server

    Read this SSC article on running the default trace. Default trace - A Beginner's Guide

    By Adam Haines,

    http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/

    In it you will find code that will return the application name.

    Here...

  • RE: SELECT INTO

    paul s-306273

    As for posing a question, I don't actually have access to SQL Server, so I'd feel that was a bit of a fraud.

    Sorry to hear that you...

  • RE: decimal point in SQL-server2000 / decimal comma in SQL-server2008

    Here is one method of showing a decimal value in the format you requested.

    DECLARE @V DECIMAL(18,4)

    SET @V =10001.5768

    SELECT REPLACE(convert(nvarchar(15), cast(@V as money), 2),'.',',')

    Result:

    10001,5768

  • RE: precision/scale

    As steveb said:

    DECLARE @First DECIMAL(8,0)

    DECLARE @Second DECIMAL(8,2)

    SET @First = 1233555

    SET @Second = @First / 100

    SELECT @Second

  • RE: Export data to a file

    This will export data to a CSV file .....

    From DB table to text file. the text file must exist. Text file must have a first line of comma...

  • RE: Bad Database Design

    YSLGuru

    MANAGEMENT - The problem (from personal experience) is that far too foten the managemnt or decission makers are often programmers themselves and unless they have at least a respect...

  • RE: SSIS Equivalent?

    Phil Parkin

    Reverse the string, find the first occurrence in the reversed string and then subtract that from the total string length

    And here is a link that explains the REVERSE...

  • RE: Data Matching

    If this is a one time or very infrequent requirement I suggest using the Excel work book and not T-SQL. Refer to the following from Microsoft on ways to...

  • RE: Bad Database Design

    Jon Russell

    Cris E - Another example to Andy's point, "a focus on just storing the data and not on using all the other things that can insure both data integrity...

  • RE: SELECT INTO

    paul.knibbs

    If all people want to do is earn points, they can just wait until the day after the question is asked (when the answer is given on the daily e-mail)...

Viewing 15 posts - 1,876 through 1,890 (of 3,221 total)