Forum Replies Created

Viewing 15 posts - 796 through 810 (of 1,183 total)

  • RE: Referencing the value of a text box

    To refer to other report items such as text boxes use...

    =ReportItems!textBox1.value

  • RE: INSERT A Record Based on Count

    This is another classic example of how a "tally" or "numbers" table can be used. We'll see if Jeff's around 😀

    First, if you haven't create a numbers/tally table you'll need...

  • RE: How to group by Academic Year..

    I've tested this as best I could without sample data, but all that your really doing here is saying that if the @period is 'A' for Academic and the month...

  • RE: sql question

    Can you provide the DDL (create scripts) for the tables, or at least the relevant columns and their datatypes. Sample data would be nice too. 😉

  • RE: Case expression problem

    Thanks Jeff! I've never worked with Oracle so that info was very informative ... :hehe:

  • RE: Finding a substring within a text

    I haven't tried this but, just found it...http://www.data-for-all.com/blog/index.php?p=119

    (from Ken's suggestion)

  • RE: Case expression problem

    :w00t: I missed that little Oracle reference.

    Try this: (moving your MAX statement inside the CASE)

    SELECT

    CASE WHEN MAX(somedate) IS NULL THEN GETDATE() ELSE somedate END AS...

  • RE: Case expression problem

    I don't think you need to use CASE at all.

    SELECT

    ISNULL(MAX(somedate),GETDATE()) AS somedate

    FROM trydates

    WHERE somedate < (GETDATE()-4)

  • RE: Help with a Pivot Table

    Opus,

    You'll have to modify this to fit your needs, but this should get you there.

    DECLARE @studInfo TABLE (student VARCHAR(10), period CHAR(2), absents INT)

    INSERT @studInfo

    SELECT 'Student1', '2A',...

  • RE: Grouping question

    NICE noeld

  • RE: Why Does This Return NULL?

    David (10/30/2007)


    '' is being treated as 0. That's the problem when i want one result set for 0 and a different one for ''.

    Right, but what we're saying here...

  • RE: Why Does This Return NULL?

    Why are you passing a '' to an INT parameter in the first place?

  • RE: Why Does This Return NULL?

    OK, I'm having a BAD DAY here... LOL

    I need to slow down and read what I type .. 😀

    CREATE PROCEDURE Test

    @employee int = NULL

    AS

    SELECT * FROM Employees

    WHERE EmployeeID = @Employee...

  • RE: Why Does This Return NULL?

    OOPS, my fault.:w00t:

    You ARE right. I hadn't changed the '' to 0. :hehe:

    change the code to ...

    CREATE PROCEDURE Test

    @employee int = NULL

    AS

    SELECT * FROM Employees

    WHERE EmployeeID = @Employee or ISNULL(@Employee,...

  • RE: Why Does This Return NULL?

    David (10/30/2007)


    Perhaps I could look into that, but

    1) In your example, a passed value of 0 returns all records

    I disagree, in my example if you pass a zero, then...

Viewing 15 posts - 796 through 810 (of 1,183 total)