Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql view query

Posted on 2013-06-12
4
Medium Priority
?
293 Views
Last Modified: 2013-06-18
I have a selection query that has to go out as an extract. I have made a union join but I am looking at the following issues with the user.

1. if PrivateService  is ticked (-1) and/or positiontype = Funeral -NSNA then the entry does not extract regardless if the display flag is ticked on the form (-1), and  the Role  is listed as contact.

Result = PASS (entry does not extract)

2. if the user has ticked display and with the Contact  Role is selected, then user changes their mind, they untick display flag and then tick PrivateService and/or positiontype = Funeral - NSNA.

Result = PASS (entry extracts with display flag 0, this alerts us to take the original extract out of the list.

3. If the data entry person, unticks display flag then ticks PRIVATESERVICE, and leaves role nominated as Contact, then changes their mind again, and ticks Display Flag the extract will come out with the flag -1

RESULT = FAIL

hmm without programming changes I don't know how I can treat this type of scenario.
Please find attached view sample file, what do you think.
Any suggestions on the view.
myview.txt
0
Comment
Question by:Amanda Walshaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 49

Accepted Solution

by:
PortletPaul earned 1800 total points
ID: 39240940
I am proposing a guess...

3. If the data entry person, unticks display flag then ticks PRIVATESERVICE, and leaves role nominated as Contact, then changes their mind again, and ticks Display Flag

none of these individual choices hit the database, hence the database does not even know about them., so it proceeds to evaluate the data is does know
- so to you (looking at the screen) it's a fail
but to the database it's doing what you (last) told it

as I said, a guess (but from experience, stuff like this does happen)
0
 

Author Comment

by:Amanda Walshaw
ID: 39241133
yes you are right I am just trying to cover all angles if the extract goes every 2 hours. I expect they would work it out in the time... but you never know.
regards
0
 
LVL 2

Assisted Solution

by:vivekkumarSharma
vivekkumarSharma earned 200 total points
ID: 39243955
I think you should not filter by b.todisplay inside view defination.

instead you should handle tick event and query the view accordingly.
0
 

Author Comment

by:Amanda Walshaw
ID: 39244336
yes I think I need to do a hierarchy and list the Permutations and get the business to decide.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question