Forum Replies Created

Viewing 15 posts - 916 through 930 (of 1,217 total)

  • RE: Update statement

    sarwa,

    something is wrong with the database design in the posted example. Every column must have certain meaning, you can't simply shake the table as a dustbin to push garbage down and...

  • RE: Interviews Part 2

    Abuse of power? Make the individual feel lesser of an individual because of his knowledge base? Served no useful purpose?

    These are some of the opinions about e-mail sent to the...

  • RE: Handling null in a result

    If I understood you correctly, then you should put the mentioned condition into WHERE clause:

    where (m.it1 <> 'Y' or m.it1 is null)

    and m.issuetype in ('ISSUE', 'RETURN')

    and m.storeloc in ('B631OT', 'B642GB', 'B641GB',...

  • RE: Query Help

    I would use a self join in this case:

    SELECT DISTINCT bc1.FK_BOOK

    FROM #BookCategory bc1

    LEFT JOIN #BookCategory bc2 on bc1.FK_BOOK = bc2.FK_BOOK AND bc2.CATEGORY IN ('A','B')

    WHERE bc2.FK_BOOK IS NULL

    In addition to this...

  • RE: Select statement in Update query

    Try adding DISTINCT keyword first - SET SoDiagnosisID =  (select DISTINCT A.SoDiagnosisID ......) - maybe your query just returns the same value several times. SQLS does not check, whether the values...

  • RE: Last Saturday in month

    I think it can be even simpler if you're not doing it inside UDF (UDF does not allow SET DATEFIRST). It will work for any valid dates, and you can...

  • RE: Querying information_schema with database as parameter

    Tishal, to mark a text inside text, you have to use two single quotes - not a double quote. In your case, just replace the " around dtproperties with ''...

  • RE: Import Data issue

    Just a hunch... I don't know what precisely were you doing, but if you CREATED the table first and then used the import tools, it is quite possible, that the...

  • RE: How to Design these Tables.

    Hi,

    this looks like example of hierarchy, though I can't be sure from such short example. Is it so that certain value of Field2 always has the same value in Field1.....

  • RE: how do I use dynamic sql inside functions?

    I'm not sure now where to post, whether here or in the other thread - but hopefully it doesn't matter. This is a very simplified function without any validity checks (whether...

  • RE: NULLS

    I didn't say that I am avoiding NULLs, just that I don't like it if a table has say 20 columns of which 12 have a value supplied only in 10%...

  • RE: how do I use dynamic sql inside functions?

    If you are looking for a universal solution that would do all this, be able to accept name of column as a parameter and be used directly in a select...

  • RE: NULLS

    OK, Chris, thanks for explanation. This method is fine for some occasions... but I would be afraid to use it fully /i.e. to eliminate any NULLs/ on a database with hundreds of tables (already...

  • RE: how do I use dynamic sql inside functions?

    From your description I don't understand, how do you know from which table which of the values should be? You have values 14, -1 and 11 that are ID in...

  • RE: NULLS

    Eh... both default blank values (like empty string in varchar) and NULLs are a sign of bad design? Well, what would you then propose to do with a column like Middle Name if...

Viewing 15 posts - 916 through 930 (of 1,217 total)