SMO

Technical Article

RE: UDF as Computed Column

  • Reply

Can you tell me why the first example isnt deterministic? I can see that the parent relationship can change over time but what rule is exactly violed that are mentioned in BOL? : Whether a user-defined function is deterministic or nondeterministic depends on how the function is coded. User-defined functions are deterministic if: The function […]

You rated this post out of 5. Change rating

2003-06-18

Technical Article

RE: Conditional WHERE

  • Reply

Not to one up Jay here (sorry joke about another thread). But here is another alternative. SELECT COALESCE(LTRIM(COALESCE(Salutation,'') + ' ' + FName + ' ' + LName), BusinessName) AS ClientName, A.* FROM Clients C INNER JOIN InvoiceHeader I ON I.ClientID=C.ClientID INNER JOIN Addresses A ON A.ClientID=C.ClientID AND (CASE WHEN A.AddrTypeID=@BillingAddressID THEN 1 ELSE A.PrimaryAddr […]

2003-06-17

2 reads

Technical Article

RE: help need

  • Reply

If I understand, you are getting the criteria from a list box from a screen. My suggestion is: create procedure [dbo].[query] @ProgramType char(1), @AccountName char(1), @ProgramStatus char(1) as select ProgramId ProgramType AccountName ProgramName ProgramBudget ProgramStatus from <table> where ProgramType like @ProgramType and AccountName like @AccountName and ProgramStatus like @ProgramStatus If in your list box you […]

You rated this post out of 5. Change rating

2003-05-20

Technical Article

RE: Computer lazy after error on programming with SQL

  • Reply

5409045121009 Thanks once more. What I'm doing -- before launching each page, but only after trying to give more attention in reviewing the texts and commands (of course!!!) -- is, at MMC, right-clicking over my site, disconnecting-and-(re)connecting IIS. Wish it -also-helps!!! Dalton

2003-05-11

1 reads

Technical Article

RE: HELP! Query not properly displaying data

  • Reply

SUM(a.FUEL_SALES*.0775) AS FUEL_TAX, b.AMOUNT AS FUEL_MAN FROM CSCSHBAL a LEFT OUTER JOIN CSCRDTTL b ON (b.CARD_NAME='FUELMAN' AND a.DBR_DATE=b.DBR_DATE AND a.STORE_ID = b.STORE_ID) WHERE (a.STORE_ID LIKE @STORE_ID AND a.DBR_DATE>=@START_DATE AND a.DBR_DATE<=@END_DATE) This code got me this result: STORE_ID DBR_DATE TAXABLE_SALES NON_TAXABLE_SALES FUEL_SALE FUEL_TAX FUEL_MAN -------- --------------------------- ----------------- ---------------------------------- 7700 2003-03-27 1709.01 1183.70 14282.966025 1199.923975 NULL 7703 […]

2003-05-06

Technical Article

RE: Dates for report

  • Reply

WHERE invoicedate BETWEEN DATEADD( mm, -6, CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() ) AS CHAR( 11 ) ) AS DATETIME ) ) AND CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() ) AS CHAR( 11 ) ) AS DATETIME ) Although I would recommend running GETDATE() one time prior to running this statement and using […]

You rated this post out of 5. Change rating

2003-05-02

Technical Article

RE: condition on a FROM clause or WHERE clause

  • Reply

If you are talking about JOIN condition, it is better and more correct in the JOIN clause, not in the WHERE clause. It is also better to limit your result as soon as possible. Consider this: SELECT col1, col2 FROM t1 JOIN t2 ON t1.c3 = @variable AND t1.c4 = t2.c5 Having ON t1.c3 = […]

2003-05-02

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers