Forum Replies Created

Viewing 15 posts - 5,086 through 5,100 (of 6,037 total)

  • RE: Time Span Help

    Start here:

    CREATE TABLE [dbo].[Inp_Stay] (

     [MemberID] [char] (22) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

     [Product] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

     [Provider] [int] NOT NULL ,

     [Admit] SMALLDATETIME NOT NULL ,

     [Discharge]

    _____________
    Code for TallyGenerator

  • RE: SQL Efficiency Help

    Original sugession you were not agree with was:

    SELECT P.[ProgramName],

     ISNULL(SUM([CasesReceived]),0

    _____________
    Code for TallyGenerator

  • RE: SQL Efficiency Help

    If you do something without knowing what are you doing you'll get unexpected results.

    If you do sum(value1)+sum(value2) you'll get what is expected.

    But if you do sum(value1+value2) you actually do not aggregate...

    _____________
    Code for TallyGenerator

  • RE: inserting UCS-2 data into an nvarchar

    Which query are you trying to execute?

    What is the error message?

    What kind of data and which way you supply to that query?

    _____________
    Code for TallyGenerator

  • RE: modifying / replacing text in a text column

    If you don't know structure of your text you cannot build a script to modify it.

    If you know enough to modify the text than you can dismantle it into pieces,...

    _____________
    Code for TallyGenerator

  • RE: inserting UCS-2 data into an nvarchar

    Which way are you trying to insert UCS-2 into nvarchar?

    Can you provide any sample of your script?

    _____________
    Code for TallyGenerator

  • RE: modifying / replacing text in a text column

    Probably you could do it with UPDATETEXT and PATINDEX.

    But, honestly, it's easier to do it with simple macro in MS Word.

    _____________
    Code for TallyGenerator

  • RE: modifying / replacing text in a text column

    BLOB fields (and TEXT as a case of DLOB) are not a part of Relational Data model, so it not to be managed or processed by RDMS (and SQL Server as...

    _____________
    Code for TallyGenerator

  • RE: Data from Previous Row

    Yes, Sergiy here is still the same for at least 3 years.

    Actually I don't look on my number of posts, only on others.

    So...

    _____________
    Code for TallyGenerator

  • RE: Data from Previous Row

    No, that table must be imported from some hierarchical database.

    So, you cannot find any key in table itself, you must know how and where this particular system holds the order...

    _____________
    Code for TallyGenerator

  • RE: Nested values in a table

    Try something like this:

    IF EXISTS (SELECT * FROM sysobjects WHERE  name = N'Find_Newest')

     DROP FUNCTION Find_Newest

    GO

    CREATE FUNCTION dbo.Find_Newest

     (@OldOne nvarchar(20) )

    RETURNS nvarchar(20)

    AS

    BEGIN

    Declare @N nvarchar(20), @O nvarchar(20)

    Declare @Time datetime

    select...

    _____________
    Code for TallyGenerator

  • RE: Creating Row Number Field

    Tried to reproduce the error described in that article - no luck.

    Everytime it inserts lines in right order.

     

    _____________
    Code for TallyGenerator

  • RE: Data from Previous Row

    Your way is quite dangerous. Rows may be not in order already.

    Set up order right on data arrival:

    SELECT Identity(int, 1,1) as ID, *

    INTO test_table

    FROM OPENQUERY(...) -- or whatever...

    _____________
    Code for TallyGenerator

  • RE: Data from Previous Row

    I'm afraid VB won't help.

    Your rows will be shuffled after 1st update. And you could never restore the original order.

    You definetely wrong about old system. It DOES hold the order...

    _____________
    Code for TallyGenerator

  • RE: Data from Previous Row

    So, you have nothing to do with this.

    Sorry.

    You must have lost some data when copied data from legacy system. Something you did not noticed made those rows consequtive. And now...

    _____________
    Code for TallyGenerator

Viewing 15 posts - 5,086 through 5,100 (of 6,037 total)