Where With Three Choices

Feb 11, 2004

I'm trying to build a sproc with a where cluse that looks at a boolean field. I need to say if [Primary] is 1 then show all primary phones. If [Primary] is 0 or Null then return all records. I have it started like this;





WHERE dbo.tblPhones.[Primary]=Isnull(@PrimOrNot,dbo.tblPhones.[Primary]=1) Or dbo.tblPhones.[Primary]=0





Thanks for any help,

View 7 Replies


ADVERTISEMENT

TempDB In Ram, What Are My Choices

Nov 17, 1998

"TempDB in RAM. This option allows SQL Server to process the results of intermediate database operation in memory rather than on the hard disk. If you have enough memory available, using TempDB in RAM can dramatically improve performance of sorting, GROUP BY calculations, joins and queries that require temporary work tables"

Hi, that was a quote from MS white paper over the internet... Does that mean that I can get faster query output once I used the temp DB in Ram... what other things which I do not know that I may worry about if I use tempDB in Ram...
when allocating some ram to the tempdb, does that mean that I am not going to use it ... Please advice

Ali

View 3 Replies View Related

Choices For Duplicating Database

Aug 22, 2006

I am developing an application that uses SQL Server 2000 for the back end. I am at the stage where some modules in the app can be tested while I finish development on some others. I run my own tests against SQL Server running on my own PC but for other people to test I have set up another server with SQL Server 2000 and have restored my database there.

My question is as follows:
I would like any changes to my database (structure and data) to be replicated on the test server's database (not necessarily immediately, but without much delay). I've heard the buzz words (log shipping, replication, etc) but would like some advice on the best way to proceed.
At the moment I don't need any data back from the test server and I don't particularly care if test data on that server is lost although these may become issues later on.

View 9 Replies View Related

Multiple Choices With Parameters

Aug 15, 2007

I need to pass a parameter to a stored procedure that allows the user to select all store numbers or a combination thereof.
The portion that selects all works fine. I am have trouble with the later. My code looks like this:

CREATE PROCEDURE vch_GetSurgeryPatientsWithoutOrdersFromEyeSite_clb
(
@StartDate datetime,
@EndDate datetime,
@center varchar (1000)
)
AS

IF @StartDate IS NULL
BEGIN
Set @StartDate = GetDate()
Set @EndDate = (GetDate ()+90)
END
Declare @StoreList TABLE ( CenterID int )

-- Get our Centers
IF ( @Center = 'ALL' ) or ( @Center IS NULL )
BEGIN
INSERT @StoreList
SELECT DISTINCT POS_Site_ID FROM LVIGP.dbo.POS40108 (nolock)
END
ELSE
BEGIN

INSERT @StoreList
SELECT DISTINCT POS_Site_ID
FROM LVIGP.dbo.POS40108 (nolock) WHERE POS_Site_ID = @Center
END

the first if statement returns all of the store number like this
CenterID
001
002
010
024
057

the second if returns nothing
I tried using coalesce but it returns the store number like this:
CenterID
001, 002, 010, 024, 057
This does not work with the rest of my program.

View 1 Replies View Related

Front End Development Language Choices

Feb 18, 2003

Wondering if anyone has pro's and cons for choosing a vehicle to build front end applications for a SQL Server 2000 back end.

Historically we used Access 97 with VBA code to create client side ODBC connections. In Code we would issue stored procedures through a connection string. This worked fine.

With Microsoft moving onward our company is transitioning to supported products. So DAO is dead.

My colleagues like Access 2000 and have imported some 97 databases doing small re-writes to make them work.

Everything I read says we should be interacting with SQL using ADO.

The other problem is not all users have admin rights on their machines, so adding application extensions for VB6 is a problem. We might be able to change this.

Should we just build with Access 2000 from scratch using ADO to avoid JET?

Should we use VB6?

Is there another application we should be looking at?

View 1 Replies View Related

Clearing Multi-Value Parameter Choices

Oct 18, 2007



Hello,

I am searching for a resolution. I did a few searches on this site and could not gain the exact answer. I apologize is this thread is a duplicate.

I have written a report containing Multi-Values for Reporting Services. When a user selects the values for the report parameters, the checked values continue to be selected after the report is completed.

Is there a way to clear these parameters?

Some of our users run the same report more than once during a single web session.

Thank you for your attention!

View 3 Replies View Related

High Availability Choices From Mgt. Perspective

Aug 24, 2007



I need to make a brief presentation to upper management about High Availability options in SQL Server 2005.

Current choices being considered are:

- Failover clustering
- Log shipping
- Mirroring

Q1: Are there other choices?

Q2: How do these choices compare in terms of cost, complexity of setup, ease of deployment, recovery procedures in case of a disaster?

Ben Aminnia

View 6 Replies View Related

Creating Expressions For Multiple Choices

Mar 14, 2008



Hi,

I have to create an expression that makes bold the text for some possibilities, otherwise the font will keep same, is there any staff for creating an expression like "IF ID_Name IN (x,y,z...) THEN bla-bla" like querying in SQL? Cuz I have to use multiple possibilites for same condition

View 3 Replies View Related

Save The Choices Made By Users In The Parameter Selection

Nov 16, 2005

Dear Anyone,

View 2 Replies View Related

Encryption Choices / Best Practices For Hosted Environment (shared Server)

Aug 29, 2007

I'm building a hosted website and I am using SQL 2005.
The DBA for the host has told me that i can not encrypt a symmetric key with a certificate, when using that symmetric key for encryption. As i read that this method provided optimum performance/ security for encrypting columns of data.

The DBA told me i can use a cert or a symmetric key for encryption.
I have searched for comparisons and found a blog entry by Laurentiu Cristofor comparing certs with asymmetric keys. Which leads me to believe that certs and asymm are very different than symmetric keys.

My question is which is the best choice in a hosted environment for column encryption, a cert or symmetric key.
Which is more secure? Does one offer a significant performance (dis)advantage?

TIA

View 5 Replies View Related

Reporting Services 2005 - View Report Button Clears Select All Parameter Choices

Jan 3, 2008

Has anyone encounted a problem with Reporting Services (2005) with the following scenario:
A report with a dropdown parameter allowing a Select All choice -

If the selection list is fairly long and Select All is selected - if the user clicks the View Report button the selection list is completely reset (i.e. all items are unselected). This seems to happen if the user quickly clicks the View Report button immediately after clicking the Select All box on the parameter dropdown.

This happens inconsistently - some users experience it frequently while others do not see it at all (using the same parameter values, etc.)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved