Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Advandced Search

Author  Topic 

Anamika
Starting Member

3 Posts

Posted - 2007-09-27 : 09:10:10
Hi want a select qyuery for retieving a patient's record from sql db.
The search query is based on firstname,lastname,add1,add2. If all are dn then the exact row will be got else based on the criteria gn .. ex
If name alone is given then all records with that nam. or name and add1 is given then the records of all Smiths living in NY...
Any idea ?

Anamika
http://technoblab.blogspot.com

Kristen
Test

22859 Posts

Posted - 2007-09-27 : 09:12:49
"If all are dn then the exact row will be got else based on the criteria gn .. ex"

What do "dn" and "gn .. ex" mean?

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-28 : 02:31:03
quote:
Originally posted by Kristen

"If all are dn then the exact row will be got else based on the criteria gn .. ex"

What do "dn" and "gn .. ex" mean?

Kristen



As far as I understand,
dn-done
gn..ex-go and execute


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-28 : 02:32:36
quote:
Originally posted by Anamika

Hi want a select qyuery for retieving a patient's record from sql db.
The search query is based on firstname,lastname,add1,add2. If all are dn then the exact row will be got else based on the criteria gn .. ex
If name alone is given then all records with that nam. or name and add1 is given then the records of all Smiths living in NY...
Any idea ?

Anamika
http://technoblab.blogspot.com


Can you post some sample data with expected output?
Also dont use any shortcut words like dn, gn, etc

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-28 : 02:49:01
The blog seemed very articulate, by comparison!
Go to Top of Page
   

- Advertisement -