Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,217 total)

  • RE: Table Design Question

    Let's look at it this way...

    - every SubCategory always belongs to some Affiliation, and only to one

    - having both FK's in the table Institutions is not correct, because you duplicate...

  • RE: Sum records if Null is present in second record

    Aargh didn't come through, have to write again.

    To be honest, I would insist that the import file must have values in all columns....

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

    KYSC,

    You posted you solved the problem by rewriting the query, but in case you still are interested in finding out what was the problem... there is no way to...

  • RE: Problem with query

    Same as Ryan, I'm not sure how efficient this code is, but it should work - if what you said is correct, I mean if there are no gaps (time...

  • RE: Problem with query

    If so, then the result should be following... is this what you need?

    Item  |StartDate  |EndDate    | Price

    1        1/1/2004    31/2/2004   100

    1        1/3/2004    31/3/2004   150

    1        1/4/2004    31/5/2004   250

    1        1/6/2004    31/6/2004   100

    2        1/1/2004    31/2/2004   200

  • RE: Problem with query

    Please explain the position of the red row :

    Item  |StartDate  |EndDate    | Price

    1        1/1/2004    31/2/2004   100

    1        1/3/2004    31/3/2004   150

    2        1/1/2004    31/2/2004   200

    1        1/4/2004    31/5/2004   250

    1        1/6/2004    31/6/2004   100

    As you probably know, rows in tables are...

  • RE: Problem with query

    Ryan, I'm from Europe as well, so DD/MM/YYYY seems normal to me it was really just the dates like 31/2/2004 that made me...

  • RE: Problem with query

    Unfortunately, I wouldn't be so sure this will work. It would, if the StartDate and EndDate are datetime columns... however, a look at posted values tells me that this is in fact...

  • RE: Permissions to run a job

    Hmmm... did you check the job step that is failing? In Advanced properties, there is "Run as user" setting which could play some role in your problems. Otherwise, I have...

  • RE: Connections per db

    You mean like this?

    SELECT p.dbid, d.[name], Count(*)

    FROM   master..sysprocesses p

    JOIN master..sysdatabases d ON d.dbid = p.dbid

    WHERE  spid > 50 

    GROUP BY p.dbid, d.[name]

  • RE: Transaction log and simple recovery mode

    Hi,

    on a sidenote, if your log grows to 23GB every night, it would be wise to leave it at this size and not shrink it every day. It is quite...

  • RE: distinct versus group by

    I prefer DISTINCT, if the only thing I need to do is remove duplicate rows. It looks cleaner in the code, you don't have to check select list and group by...

  • RE: Simple Query

    SELECT * FROM your_table where your_column = 'E-02162/06'

    I suppose that this is not what you asked for, but I can hardly help you unless you describe what you need - that...

  • RE: What 30 days Data only

    Hmm... you say that entries from last century begin with 9, but as can be seen from your code, they only have 6 digits (otherwise the result would be nonsense)....

  • RE: full text indexing

    Please look up in BOL : Full-Text Indexing Support, sp_fulltext_catalog, sp_fulltext_table and other related entries. I don't think copying and pasting everything here would be of some use... just one little...

Viewing 15 posts - 766 through 780 (of 1,217 total)