Go Back   DeveloperBarn Forums > Databases > SQL Development

Sponsored Links

Discuss "Return Default Date If Null" in the SQL Development forum.

SQL Development - Structured Query Language (SQL) is the talk of databases. Discuss topics such as joins, triggers and other advanced SQL topics.


Reply « Previous Thread | Next Thread »
 
LinkBack Thread Tools Display Modes
  #11  
Old June 6th, 2008, 01:09 PM
mehere's Avatar
Super Sarcasm Mistress


 
Join Date: Mar 2008
Location: Wide Awake In Dreamland
Posts: 143
Thanks: 10
Thanked 27 Times in 25 Posts
Rep Power: 1
mehere will become famous soon enough

Awards Showcase
Microsoft SQL Server Classic ASP 
Total Awards: 2

Default

oh that's easy wolffy ... kill the designer. that's always the answer.
__________________
Quote of the Month:
Regret: It hurts to admit when you make mistakes - but when they're big enough, the pain only lasts a second.

Questions to Ponder:
Could it be that all those trick-or-treaters wearing sheets aren’t going as ghosts but as mattresses?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright © 2008 sbenj69
Reply With Quote
Sponsored Links
  #12  
Old June 6th, 2008, 01:18 PM
jmurrayhead's Avatar
The Barnfather

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 815
Thanks: 19
Thanked 74 Times in 71 Posts
Blog Entries: 5
Rep Power: 3
jmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura about

Awards Showcase
Microsoft Windows Microsoft .Net Microsoft SQL Server Classic ASP 
Total Awards: 4

Default

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 with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

Join our Folding team: DeveloperBarn Folding
Reply With Quote
  #13  
Old June 6th, 2008, 01:55 PM
Rebelle's Avatar
V.I.P/Donor


 
Join Date: Mar 2008
Posts: 253
Thanks: 48
Thanked 1 Time in 1 Post
Rep Power: 1
Rebelle is on a distinguished road
Default

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)
Reply With Quote
  #14  
Old June 6th, 2008, 01:58 PM
Wolffy's Avatar
Slaprentice of Wolves

 
Join Date: Mar 2008
Location: Peoria, IL
Posts: 175
Thanks: 3
Thanked 24 Times in 21 Posts
Rep Power: 1
Wolffy is on a distinguished road

Awards Showcase
Microsoft .Net 
Total Awards: 1

Default

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. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary.
Reply With Quote
  #15  
Old June 7th, 2008, 09:13 PM
Barn Newbie

 
Join Date: Mar 2008
Posts: 40
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 1
lewy is on a distinguished road
Default

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
Reply With Quote
  #16  
Old June 8th, 2008, 09:27 AM
jmurrayhead's Avatar
The Barnfather

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 815
Thanks: 19
Thanked 74 Times in 71 Posts
Blog Entries: 5
Rep Power: 3
jmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura aboutjmurrayhead has a spectacular aura about

Awards Showcase
Microsoft Windows Microsoft .Net Microsoft SQL Server Classic ASP 
Total Awards: 4

Default

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.
Reply With Quote
  #17  
Old June 8th, 2008, 10:30 PM
Barn Newbie

 
Join Date: Mar 2008
Posts: 40
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 1
lewy is on a distinguished road
Default

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 With Quote
Reply

  DeveloperBarn Forums > Databases > SQL Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Default Member Found for type richyrich .Net Development 5 May 29th, 2008 01:33 PM
Webform Default Button Devwhiz .Net Development 9 May 15th, 2008 01:15 PM


All times are GMT -4. The time now is 02:25 PM.



Content Relevant URLs by vBSEO 3.2.0