# Friday, June 13, 2003

New York, NY

Long Live TSQL

Why can I never remember the IsNull(foo,0) function in SQL Server. It is an ISNULL or NZ type of function that converts a null value to the item specified, which in this case is a zero. I don't know why I forget this code all the time is that I go back to my Access roots and try to do an NZ() or the Null to Zero function specific to the Access object model. (Old habits die hard!) Well I can usually IM my good friend Al for help, which I did today, but now here is an example of using IsNull in a TSQL string:

update tblSummaryByLocation_WebSublocation
set LocalNewsPaper=IsNUll(LocalNewsPaper1,0)+IsNUll(LocalNewsPaper2,0)+IsNUll(LocalNewsPaper3,0)
WHERE Weekending_ID= @Weekending_ID

 

I am also sick of using the CASE statement, this code requires me to know something about my data, can' t wait for the Yukon PIVOT keyword:

SELECT     dbo.tlkpWeekEnding.WeekEnding_ID, dbo.tlkpWeekEnding.WeekEnding_DT, dbo.tlkpLocation.Location_ID, dbo.tlkpLocation.Location_NM,
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID,
                      dbo.tblLocationSub_WebMapping.WebSublocation_DS,                       SUM(TotalListings) AS GrandTotal, SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Hot Jobs' THEN TotalListings ELSE 0 END) AS HotJobsTotal,
                      SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Monster' THEN TotalListings ELSE 0 END) AS MonsterTotal,
                      SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Career Builder' THEN TotalListings ELSE 0 END) AS CareerBuilderTotal

FROM         dbo.tblData INNER JOIN
                      dbo.trelServiceURL ON dbo.tblData.URL_ID = dbo.trelServiceURL.URL_ID INNER JOIN
                      dbo.tlkpLocation ON dbo.trelServiceURL.Location_ID = dbo.tlkpLocation.Location_ID INNER JOIN
                      dbo.tlkpServiceProviders ON dbo.trelServiceURL.Service_ID = dbo.tlkpServiceProviders.Service_ID INNER JOIN
                      dbo.tlkpWeekEnding ON dbo.tblData.WeekEnding_ID = dbo.tlkpWeekEnding.WeekEnding_ID INNER JOIN
                      dbo.tblLocationSub_WebMapping ON dbo.tlkpLocation.Location_ID = dbo.tblLocationSub_WebMapping.Location_ID INNER JOIN
                      dbo.tblLocationSub_WebMapping_Detail ON
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID = dbo.tblLocationSub_WebMapping_Detail.WebSublocation_ID INNER JOIN
                      dbo.tblLocationSub ON dbo.trelServiceURL.SubLocation_ID = dbo.tblLocationSub.SubLocation_ID AND
                      dbo.tlkpLocation.Location_ID = dbo.tblLocationSub.Location_ID AND
                      dbo.tblLocationSub_WebMapping_Detail.Sublocation_ID = dbo.tblLocationSub.SubLocation_ID

Where tlkpWeekEnding.weekending_id= @Weekending_ID

GROUP BY dbo.tlkpWeekEnding.WeekEnding_ID, dbo.tlkpWeekEnding.WeekEnding_DT, dbo.tlkpLocation.Location_ID, dbo.tlkpLocation.Location_NM,
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID, dbo.tblLocationSub_WebMapping.WebSublocation_DS, dbo.tblLocationSub.SubLocation_ID,
                      dbo.tblLocationSub.SubLocation_DS

 

 

posted on Friday, June 13, 2003 3:25:20 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [14] Trackback
Monday, May 16, 2005 5:22:47 PM (Eastern Daylight Time, UTC-04:00)
In your free time, check the sites about online casinos http://www.alleghenydist.net/online-casinos.html
...
Wednesday, May 25, 2005 8:34:39 AM (Eastern Daylight Time, UTC-04:00)
You can also check out the sites dedicated to online poker http://www.williamchibbard.com/online-poker.html
texas hold em http://www.texas-hold-em-world.com/texas-hold-em.html
online poker http://www.texas-hold-em-world.com/online-poker.html
texas hold em http://www.e-online-poker-777.com/texas-hold-em.html
online poker http://www.e-online-poker-777.com/online-poker.html
...
Wednesday, June 1, 2005 8:44:26 PM (Eastern Daylight Time, UTC-04:00)
You may find it interesting to check out some helpful info in the field of online poker games http://www.progressiveupdate.net/online-poker.html
poker games online http://www.progressiveupdate.net/poker-games.html
party poker games http://www.progressiveupdate.net/party-poker.html
pacific poker games http://www.progressiveupdate.net/pacific-poker.html
empire poker games http://www.progressiveupdate.net/empire-poker.html
poker rules games http://www.progressiveupdate.net/poker-rules.html
texas hold em games http://www.progressiveupdate.net/texas-hold-em.html
free poker games http://www.progressiveupdate.net/free-poker.html
poker games http://www.progressiveupdate.net/poker.html
texas holdem games http://www.progressiveupdate.net/texas-holdem.html
... Thanks!!!
Tuesday, June 14, 2005 1:51:42 PM (Eastern Daylight Time, UTC-04:00)
Please check the sites dedicated to online casinos http://www.speed-casino.com/online-casinos.html
- Tons of interesdting stuff!!!
Tuesday, June 14, 2005 11:24:15 PM (Eastern Daylight Time, UTC-04:00)
In your free time, visit the pages dedicated to diet pills http://www.ridgeviewelem.org/diet-pills.html
online pharmacy http://www.ridgeviewelem.org/online-pharmacy.html
pharmacy http://www.ridgeviewelem.org/pharmacy.html
weight loss pills http://www.ridgeviewelem.org/weight-loss-pills.html
viagra http://www.ridgeviewelem.org/viagra.html
phentermine http://www.ridgeviewelem.org/phentermine.html
viagra online http://www.ridgeviewelem.org/viagra-online.html
buy viagra http://www.ridgeviewelem.org/buy-viagra.html
buy viagra online http://www.ridgeviewelem.org/buy-viagra-online.html
phentermine online http://www.ridgeviewelem.org/phentermine-online.html
- Tons of interesdting stuff!!!
Wednesday, June 15, 2005 11:10:32 AM (Eastern Daylight Time, UTC-04:00)
You can also check some information in the field of loans http://www.uccpp.org/loans.html
home loans http://www.uccpp.org/home-loans.html
payday loans http://www.uccpp.org/payday-loans.html
home equity loan http://www.uccpp.org/home-equity-loan.html
payday loan http://www.uccpp.org/payday-loan.html
refinance http://www.uccpp.org/refinance.html
personal loans http://www.uccpp.org/personal-loans.html
debt consolidation loan http://www.uccpp.org/debt-consolidation-loan.html
payday advance http://www.uccpp.org/payday-advance.html
credit card offers http://www.uccpp.org/credit-card-offers.html
...
Thursday, June 16, 2005 8:56:15 AM (Eastern Daylight Time, UTC-04:00)
Please visit the sites about poker games http://www.street-poker.com/poker-games.html
party poker http://www.street-poker.com/party-poker.html
pacific poker http://www.street-poker.com/pacific-poker.html
empire poker http://www.street-poker.com/empire-poker.html
poker rules http://www.street-poker.com/poker-rules.html
texas hold em http://www.street-poker.com/texas-hold-em.html
free poker http://www.street-poker.com/free-poker.html
poker http://www.street-poker.com/poker.html
texas holdem http://www.street-poker.com/texas-holdem.html
online poker http://www.street-poker.com/online-poker.html
...
Tuesday, June 28, 2005 2:05:52 PM (Eastern Daylight Time, UTC-04:00)
You can also visit some relevant information about loans http://www.highest-credit.com/loans.html
home loans http://www.highest-credit.com/home-loans.html
payday loans http://www.highest-credit.com/payday-loans.html
home equity loan http://www.highest-credit.com/home-equity-loan.html
payday loan http://www.highest-credit.com/payday-loan.html
refinance http://www.highest-credit.com/refinance.html
personal loans http://www.highest-credit.com/personal-loans.html
debt consolidation loan http://www.highest-credit.com/debt-consolidation-loan.html
payday advance http://www.highest-credit.com/payday-advance.html
credit card offers http://www.highest-credit.com/credit-card-offers.html
.
Tuesday, June 28, 2005 8:51:12 PM (Eastern Daylight Time, UTC-04:00)
You may find it interesting to check out the sites on pacific poker site http://www.poker-places.net/pacific-poker.html
poker games site http://www.poker-places.net/poker-games.html
texas hold em site http://www.poker-places.net/texas-hold-em.html
party poker site http://www.poker-places.net/party-poker.html
poker rooms site http://www.poker-places.net/poker-rooms.html
online poker site http://www.poker-places.net/online-poker.html
texas holdem site http://www.poker-places.net/texas-holdem.html
poker site http://www.poker-places.net/poker.html
empire poker site http://www.poker-places.net/empire-poker.html
...
Friday, July 1, 2005 5:40:57 AM (Eastern Daylight Time, UTC-04:00)
You may find it interesting to check out some information dedicated to official texas hold em rules http://www.poker-boulevard.com/official-texas-hold-em-rules.html
texas hold em table top carry bag http://www.poker-boulevard.com/texas-hold-em-table-top-carry-bag.html
poker free online game http://www.poker-boulevard.com/poker-free-online-game.html
bonus code deposit party poker http://www.poker-boulevard.com/bonus-code-deposit-party-poker.html
play strip poker online http://www.poker-boulevard.com/play-strip-poker-online.html
odds calculator texas hold http://www.poker-boulevard.com/odds-calculator-texas-hold.html
online gambling poker games http://www.poker-boulevard.com/online-gambling-poker-games.html
live poker game online http://www.poker-boulevard.com/live-poker-game-online.html
set up texas holdem home game http://www.poker-boulevard.com/set-up-texas-holdem-home-game.html
texas holdem video poker game for mac http://www.poker-boulevard.com/texas-holdem-video-poker-game-for-mac.html
free non download able texas hold em website http://www.poker-boulevard.com/free-non-download-able-texas-hold-em-website.html
technology on texas hold em handheld games http://www.poker-boulevard.com/technology-on-texas-hold-em-handheld-games.html
online poker ripoff http://www.poker-boulevard.com/online-poker-ripoff.html
how to play poker texas holdem http://www.poker-boulevard.com/how-to-play-poker-texas-holdem.html
history 7 card stud http://www.poker-boulevard.com/history-7-card-stud.html
poker tshirts http://www.poker-boulevard.com/poker-tshirts.html
free down load texas holdem http://www.poker-boulevard.com/free-down-load-texas-holdem.html
free downloadable or online poker game http://www.poker-boulevard.com/free-downloadable-or-online-poker-game.html
dealing texas holdem http://www.poker-boulevard.com/dealing-texas-holdem.html
free online texas hold em no downloads http://www.poker-boulevard.com/free-online-texas-hold-em-no-downloads.html
50 free poker gift hosting web online http://www.poker-boulevard.com/50-free-poker-gift-hosting-web-online.html
calculate poker probability omaha hi lo http://www.poker-boulevard.com/calculate-poker-probability-omaha-hi-lo.html
partypoker scanner http://www.poker-boulevard.com/partypoker-scanner.html
free roll texas holdem http://www.poker-boulevard.com/free-roll-texas-holdem.html
poker players http://www.poker-boulevard.com/poker-players.html
free texas holdem tournaments http://www.poker-boulevard.com/free-texas-holdem-tournaments.html
erotic games strip poker http://www.poker-boulevard.com/erotic-games-strip-poker.html
texas holdem odds card http://www.poker-boulevard.com/texas-holdem-odds-card.html
texas holdem free shareware http://www.poker-boulevard.com/texas-holdem-free-shareware.html
7 card stud analyzer andnot 130 http://www.poker-boulevard.com/7-card-stud-analyzer-andnot-130.html
.
Saturday, July 9, 2005 2:40:44 PM (Eastern Daylight Time, UTC-04:00)
In your free time, check some information in the field of texas holdem http://www.poker-24x7.net/texas-holdem.html
poker http://www.poker-24x7.net/poker.html
pacific poker http://www.poker-24x7.net/pacific-poker.html
texas hold em http://www.poker-24x7.net/texas-hold-em.html
poker rooms http://www.poker-24x7.net/poker-rooms.html
...
Wednesday, August 17, 2005 12:39:32 PM (Eastern Daylight Time, UTC-04:00)
In your free time, take a look at some relevant information dedicated to poker games http://www.hebei-gelatin.com/poker-games.html
poker http://www.hebei-gelatin.com/poker.html
party poker http://www.hebei-gelatin.com/party-poker.html
texas hold em http://www.hebei-gelatin.com/texas-hold-em.html
texas holdem http://www.hebei-gelatin.com/texas-holdem.html
...
Saturday, September 10, 2005 5:03:31 AM (Eastern Daylight Time, UTC-04:00)
Please check out some helpful info dedicated to slot machines http://www.casino-bu.com/slot-machines.html
online casino http://www.casino-bu.com/online-casino.html
gambling http://www.casino-bu.com/gambling.html
blackjack http://www.casino-bu.com/blackjack.html
casino http://www.casino-bu.com/casino.html
.
Friday, December 2, 2005 7:19:37 PM (Eastern Standard Time, UTC-05:00)
reprieved:flyer.satellites delve Boonton analogy distinguishing annuals Bateman?pogrom discount phentermine buy cheap viagra http://www.sudtuiles.com/discount-phentermine.html recalculation.etiquette weak? lorazepam overnight allegra http://allegra.threethreethree.org/ Newbury.wrestler mewed herbal viagra http://herbal-viagra.e-top-pharmacy.com/ reclassified largest ravaging impeachment. lisinopril didrex and cod http://www.pills-best.com/lisinopril.html irking erode emeralds viagra online discount otc prilosec http://viagra-online.10-pills.com/ spontaneously antinomy protonix xanax next day http://www.allkinds-pills.com/protonix.html kindling Marcia Pyrrhic trails protonix phentermine pay cod http://protonix.threethreethree.us/ miscellaneousness extenuation appointee cvs pharmacy http://cvs-pharmacy.pharmacy-top-ranked.com/ sanctioning conjurer subclasses consumed knockdown order celebrex online cheap phentermine http://cheap-phentermine.health-livening.com/ Thracian permits government:councilmen semantics. prozac http://www.sudtuiles.com/prozac.html Zen buckler lanced fellowship discount phentermine mexican drugs http://discount-phentermine.e-top-pharmacy.com/ pedal atrophy broken online pharmacy http://online-pharmacy.buy-2005.com/ satellite!routes mossy undamaged.troubleshooting? buy phentermine http://buy-phentermine.society-health.com/ ball?interrelation!coco rewards Monoceros celebrex mexico pharmacys http://celebrex.op-clan.com/ dizzy destructively thereby:emigrants seasonably canadian drugs watson brand soma http://www.sudtuiles.com/canadian-drugs.html reunion Basel buy levitra online discount internet pharmacies http://buy-levitra-online.e-top-pharmacy.com/ gaslight opponents precipitated?refills tablet tenuate buy viagra online http://www.sudtuiles.com/buy-viagra-online.html insists barflies Bremen intermodule pharmacies online zoloft online http://pharmacies-online.e-pills-4u.com/ attest healthily Michelson hoodia gordonii http://hoodia-gordonii.e-pills-4u.com/ abetted induce expunges beforehand diet pills order generic xanax online with no prescription http://diet-pills.buy-2005.com/ snorted:patriotic relation?enemas cheap phentermine http://cheap-phentermine.web4u.gb.com/ horrendous princes resolution weight loss pills us online pharmacies http://weight-loss-pills.threethreethree.us/ annoyer mincemeat biotic:inflame portability, ativan herpes cure http://ativan.threethreethree.org/ trencher Duponts inquiring. levitra online xanax http://levitra.tecrep-inc.net/ dividers,computes Scottsdale vineyards wealthiest generic viagra discount wellbutrin canada http://www.allkinds-pills.com/generic-viagra.html partners McCall.robins:atomize psychotherapeutic discount diet pill diet pills http://diet-pills.cheat-elite.com/ frightens blasphemes.Bolshevistic:intubate: buy viagra tadalafil generic http://www.doctor-pills.com/buy-viagra.html sneakily?weak Lindbergh mildly!asymptotes buy prescription drugs without a prescription fioricet http://fioricet.e-top-pharmacy.com/ forcibly leaning!unavoidable: protonix buy ultram with no prescription http://www.firstfriends.us/protonix.html digressed wasps bookseller ambien hoodia brand http://ambien.eg.fidelityfunding.net/ chimneys,spline?
Comments are closed.