+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: Return Default Date If Null

  1. #11
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    830
    Rep Power
    8

    oh that's easy wolffy ... kill the designer. that's always the answer.
    Quote of the Month:
    INSIGHT: When the going gets tough, the tough get going. The smart left a long time ago.

    Questions to Ponder:
    Are people more violently opposed to fur rather than leather because it's much easier to harass rich women than motorcycle gangs?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright © 2008 sbenj69

    Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.

  2. #12
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    I'd have to agree.

    Wolffy, in .Net I tried handling the date problem by passing the NULL value from the date field through a constructor of my class which has a Nullable Of DateTime property. Unfortunately, you can't pass a NULL value to a Nullable property for some reason

    Anyway, I wanted to handle this via the query that I have to hard code.

    However, I've been in touch with some DBA's trying to get this issue resolved.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  3. #13
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Quote Originally Posted by Wolffy View Post
    Hmm, y'all seem to be posting in circles here JMH & mehere . Obviously sumpin' gotta change sumplace, so which would you like to do:
    (a) Change the data
    (b) Change the query
    (c) Handle the null in code
    (d) Write a sproc
    (e) Kill the DB designer
    ?
    I vote for (e)

  4. #14
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Yeah, I tried to use Nullable<Date> as well, and found it to be too big a pain in the fistookis. Went with Date.MinValue where a null was needed. Now, how did I do that...hmmm.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  5. #15
    Barn Frequenter lewy is on a distinguished road lewy's Avatar
    Join Date
    Mar 2008
    Posts
    108
    Rep Power
    4

    c'mon just convince your boss to let you kill the db designer
    Are you sure it wasn't you

    I'd get rid of the null values.
    Isn't there anything you can do to fill in the null values?
    Something like filling in those values with the actual data?

    Once I run into something similar, but fortunately, once I started asking about the hired dates
    It so happened that someone had another db where these values were and all I had to do
    was import this into the db with nulls and problem solved.

    Ask around, who knows, perhaps someone has this data

  6. #16
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Okay, so I brought it up during my application demo and the guy who is above all DBA's said, "NULL is bad".

    So at least him and I are on the same page. Hopefully we can come up with some solution. One of the databases that my app uses, unfortunately, is not under his control and the lady who is in charge of the data is a complete possessive b!tch. So that's my next hurdle.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  7. #17
    Barn Frequenter lewy is on a distinguished road lewy's Avatar
    Join Date
    Mar 2008
    Posts
    108
    Rep Power
    4

    Quote Originally Posted by jmurrayhead View Post
    ... and the lady who is in charge of the data is a complete possessive b!tch. So that's my next hurdle.
    So now we know who you're gonna kill lol
    Just ask her to create a query using her null values and tell her see if she understands
    thru that thick skull of hers that you just can't have a null date of hire

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. No Default Member Found for type
    By richyrich in forum .NET Development
    Replies: 5
    Last Post: May 29th, 2008, 02:33 PM
  2. Webform Default Button
    By Devwhiz in forum .NET Development
    Replies: 9
    Last Post: May 15th, 2008, 02:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO