SQL Help: selection of tickets without open tasks
Hi gurus,I'm new to SQL. I need your help for a script where I pick up tickets without open tasks.
Say, here is the table of tasks
Table: task
------------------------------
| TicketID | TaskID. TaskStatus.
------------------------------
| 1. 1. O |
| 1. 2. O |
| 1. 3. O |
| 2. 4. C |
| 2. 5. C |
| 3. 6. C |
| 3. 7. O |
------------------------------
The query should return the ticketid (s) with all its taskstatus = 'C '.
Any help would be much appreciated.
Thank you
Hello
surya_vus wrote:
Frank,Your query will exclude other State of the task?
Try it and see!
If, in your real problem, the relevant information are spread over three tables, then join them.
If there is a condition of additional, based on reason, then add that. The WHERE clause is the most logical place.
If you are interested in taskstatus in 'C' or 'F', then test for one or the other.
If the GROUP OF... HAVING solution is:
SELECT ti.ticketid
FROM ticket ti
JOIN task ta ON ti.ticketid = ta.ticketid
JOIN taskstatus st ON ta.taskstatusid = st.taskstatusid
WHERE ti.reason = 'C'
GROUP BY ticketid
HAVING COUNT (*) = COUNT ( CASE
WHEN st.taskstatus IN ('C', 'F') THEN 1
END
);
Tags: Database
Similar Questions
-
at one point, my computer started acting funny. for example, he would play trailers (just sounds or non-video) without open programs. checking task Mgr and also programs that are currently running, but trailer not played! strange. now, when I turn on my computer, it is extremely slow, if not completely frozen. I check the task mgr and it says CPU = 100% without doing me anything. I have nearly 60 applications that run, but have no idea which are needed. Help, please
If you think you have cleaned up a bit - he envisions is Windows XP...
Search for malware:
Download, install, execute, update and perform analyses complete system with the two following applications:
Remove anything they find. Reboot when necessary. (You can uninstall one or both when finished.)
Search online with eSet Online Scanner.
The less you have to run all the time, most things you want to run will perform:
Use Autoruns to understand this all starts when your computer's / when you log in. Look for whatever it is you do not know using Google (or ask here.) You can hopefully figure out if there are things from when your computer does (or connect) you don't not need and then configure them (through their own built-in mechanisms is the preferred method) so they do not - start using your resources without reason.
You can download and use Process Explorer to see exactly what is taking your time processor/CPU and memory. This can help you to identify applications that you might want to consider alternatives for and get rid of all together.
Do some cleaning and dusting off this hard drive:
You can free up disk space (will also help get rid of the things that you do not use) through the following steps:
Windows XP should take between 4.5 and 9 GB * with * an Office suite, editing Photo software, alternative Internet browser (s), various Internet plugins and a host of other things installed.
If you are comfortable with the stability of your system, you can delete the uninstall of patches which has installed Windows XP...
http://www3.TELUS.NET/dandemar/spack.htm
(Especially of interest here - #4)
(Variant: http://www.dougknox.com/xp/utils/xp_hotfix_backup.htm )You can run disk - integrated into Windows XP - cleanup to erase everything except your last restore point and yet more 'free '... files cleaning
How to use disk cleanup
http://support.Microsoft.com/kb/310312You can disable hibernation if it is enabled and you do not...
When you Hibernate your computer, Windows saves the contents of the system memory in the hiberfil.sys file. As a result, the size of the hiberfil.sys file will always be equal to the amount of physical memory in your system. If you don't use the Hibernate feature and want to reclaim the space used by Windows for the hiberfil.sys file, perform the following steps:
-Start the Control Panel Power Options applet (go to start, settings, Control Panel, and then click Power Options).
-Select the Hibernate tab, uncheck "Activate the hibernation", and then click OK. Although you might think otherwise, selecting never under "Hibernate" option on the power management tab does not delete the hiberfil.sys file.
-Windows remove the "Hibernate" option on the power management tab and delete the hiberfil.sys file.You can control the amount of space your system restore can use...
1. Click Start, right click my computer and then click Properties.
2. click on the System Restore tab.
3. highlight one of your readers (or C: If you only) and click on the button "settings".
4 change the percentage of disk space you want to allow... I suggest moving the slider until you have about 1 GB (1024 MB or close to that...)
5. click on OK. Then click OK again.You can control the amount of space used may or may not temporary Internet files...
Empty the temporary Internet files and reduce the size, that it stores a size between 64 MB and 128 MB...
-Open a copy of Microsoft Internet Explorer.
-Select TOOLS - Internet Options.
-On the general tab in the section 'Temporary Internet files', follow these steps:
-Click on 'Delete the Cookies' (click OK)
-Click on "Settings" and change the "amount of disk space to use: ' something between 64 MB and 128 MB. (There may be many more now.)
-Click OK.
-Click on 'Delete files', then select "Delete all offline content" (the box), and then click OK. (If you had a LOT, it can take 2 to 10 minutes or more).
-Once it's done, click OK, close Internet Explorer, open Internet Explorer.You can use an application that scans your system for the log files and temporary files and use it to get rid of those who:
CCleaner (free!)
http://www.CCleaner.com/
(just disk cleanup - do not play with the part of the registry for the moment)Other ways to free up space...
SequoiaView
http://www.win.Tue.nl/SequoiaView/JDiskReport
http://www.jgoodies.com/freeware/JDiskReport/index.htmlThose who can help you discover visually where all space is used. Then, you can determine what to do.
After that - you want to check any physical errors and fix everything for efficient access"
CHKDSK
How to scan your disks for errors* will take time and a reboot.Defragment
How to defragment your hard drives* will take timeCleaning the components of update on your WIndows XP computer
While probably not 100% necessary-, it is probably a good idea at this time to ensure that you continue to get the updates you need. This will help you ensure that your system update is ready to do it for you.
Download and run the MSRT tool manually:
http://www.Microsoft.com/security/malwareremove/default.mspx
(Ignore the details and download the tool to download and save to your desktop, run it.)Reset.
Download/install the latest program Windows installation (for your operating system):
(Windows XP 32-bit: WindowsXP-KB942288-v3 - x 86 .exe )
(Download and save it to your desktop, run it.)Reset.
and...
Download the latest version of Windows Update (x 86) agent here:
http://go.Microsoft.com/fwlink/?LinkId=91237
... and save it to the root of your C:\ drive. After you register on the root of the C:\ drive, follow these steps:Close all Internet Explorer Windows and other applications.
AutoScan--> RUN and type:
%SystemDrive%\windowsupdateagent30-x86.exe /WUFORCE
--> Click OK.(If asked, select 'Run'). --> Click on NEXT--> select 'I agree' and click NEXT--> where he completed the installation, click "Finish"...
Reset.
Now reset your Windows with this FixIt components update (you * NOT * use the aggressive version):
How to reset the Windows Update components?Reset.
Now that your system is generally free of malicious software (assuming you have an AntiVirus application), you've cleaned the "additional applications" that could be running and picking up your precious memory and the processor, you have authorized out of valuable and makes disk space as there are no problems with the drive itself and your Windows Update components are updates and should work fine - it is only only one other thing you pouvez wish to make:
Get and install the hardware device last drivers for your system hardware/system manufacturers support and/or download web site.
If you want, come back and let us know a bit more information on your system - particularly the brand / model of the system, you have - and maybe someone here can guide you to the place s x of law to this end. This isn't 100% necessary - but I'd be willing to bet that you would gain some performance and features in making this part.
If you eventually want to install properly - you will need the installation media (or some way to restore the system to factory settings) and numbers of the product key partner/serial for Windows XP and all of your software installed individually. You should have backups of things important to you - such as photos, music, documents, favorites/bookmarks Internet, emails, etc and so forth before you consider even to do something like that.
-
In the mail the bar at the bottom of the Inbox window won't slide up to allow the contents of the selected message appear without double click to open it in a separate window. A thinking about it? I can't find anything in the preferences that relates. The ability to drag the bar just seems jammed.
Using El Capitan? If so, in Mail, go to preferences-> look at one and activate the option "use the classic setup."
-
Developer SQL without opening the script runing script
Hi, I exported to other tables in an insert script and I got big enough file - 186 MB-> 1123380 rows in the table.
Now I want to run this script, but the file is too large to open it in sql developer.
Is there an option like runing script file (without opening the script in sql developer)?
Thank you, DanIn a worksheet, enter @scriptname and press F9.
I'm not sure of what the impact on the memory usage to perform it like that. A better alternative for large scripts might be to use sqlplus.
-
SQL - last selection query save values for each date in term
Hello
Can anyone help me please with my problem.
I'm trying to get the last balance recorded for each day of specific box (1 or 2) in a given period of days of the database ms access using ADOTool.
I'm trying to get this information with SQL query but so far without success.
My table looks like this:
Name of the table: TestTable
Date Time Location Box Balance 20.10.2014. 06:00:00 1 1 345 20.10.2014. 12:00:00 1 1 7356 20.10.2014. 18:45:00 1 1 5678 20.10.2014. 23:54:00 1 1 9845 20.10.2014. 06:00:02 1 2 35 20.10.2014. 12:00:04 1 2 756 20.10.2014. 18:45:06 1 2 578 20.10.2014. 23:54:10 1 2 845 21.10.2014. 06:00:00 1 1 34 21.10.2014. 12:05:03 1 1 5789 21.10.2014. 15:00:34 1 1 1237 21.10.2014. 06:00:00 1 2 374 21.10.2014. 12:05:03 1 2 54789 21.10.2014. 15:00:34 1 2 13237 22.10.2014. 06:00:00 1 1 8562 22.10.2014. 10:00:00 1 1 1234 22.10.2014. 17:03:45 1 1 3415 22.10.2014. 22:00:00 1 1 6742 22.10.2014. 06:00:05 1 2 562 22.10.2014. 10:00:16 1 2 123 22.10.2014. 17:03:50 1 2 415 22.10.2014. 22:00:10 1 2 642 23.10.2014. 06:00:00 1 1 9876 23.10.2014. 09:13:00 1 1 223 23.10.2014. 13:50:17 1 1 7768 23.10.2014. 19:47:40 1 1 3456 23.10.2014. 21:30:00 1 1 789 23.10.2014. 23:57:12 1 1 25 23.10.2014. 06:00:07 1 2 976 23.10.2014. 09:13:45 1 2 223 23.10.2014. 13:50:40 1 2 78 23.10.2014. 19:47:55 1 2 346 23.10.2014. 21:30:03 1 2 89 23.10.2014. 23:57:18 1 2 25 24.10.2014. 06:00:55 1 1 346 24.10.2014. 12:30:22 1 1 8329 24.10.2014. 23:50:19 1 1 2225 24.10.2014. 06:01:00 1 2 3546 24.10.2014. 12:30:26 1 2 89 24.10.2014. 23:51:10 1 2 25 ...
Let's say that the period is 21.10.2014. -23.10.2014. and I want to get the last balance recorded for zone 1. for each day. The result should look like this:
Date Time Location Box Balance 21.10.2014. 15:00:34 1 1 1237 22.10.2014. 22:00:00 1 1 6742 23.10.2014. 23:57:12 1 1 25
So far, I managed to write a query that gives me the balance so that a SINGLE date (date more time in the table), but I need balance for EACH date in a specific period.
My incorrect code (has not managed to implement "BETWEEN" for the dates...):
SELECT TestTable.[Date], TestTable.[Time], TestTable.[Location], TestTable.[Box], TestTable.[Balance] FROM TestTable WHERE Time=(SELECT MAX(Time) FROM TestTable WHERE Location=1 AND Box=1 );
TNX!
NP
Here's the correct query (just copy - paste):
SELECT T1.Date, T1.Time, T1.Location, T1.Box, T1.Balance FROM TestTable T1 INNER JOIN ( SELECT MAX(Time) AS Max_Time FROM TestTable WHERE Location=1 AND Box=1 AND Date BETWEEN #10/27/2014# AND #11/1/2014# GROUP BY Date) T2 ON T1.Time=T2.Max_Time;
The problem is in the SELECTION within the INNER JOIN. This SELECTION selects the time max for each date, because we want this and then the entire table, we choose filelds we want, but now we have only fields with the time max.
Here is a really good explanation of INNER JOIN if anyone is interested--> JOINT INTERNAL
Peace!
-
help in the application without using the pivot function
Hi gurus,
Can you please help write the query without using the PIVOT function.
Thanks in advance!...WITH indata AS (SELECT 1 sn, '123:456,789,323:456,213,344,345:5454' x from dual UNION ALL SELECT 2, 'abcd:fgrfr,rfrf,rfred,tg:tg,tg:ophhh,op,vdfgbh:poijn' x from dual), instr AS (SELECT a.SN, rownum RN, B.column_value || CASE WHEN B.column_value NOT LIKE '%:%' THEN ':' END column_value FROM indata a, TABLE(CAST(multiset (SELECT trim(SUBSTR(x, (CASE LEVEL WHEN 1 THEN 1 ELSE instr(x, ',', 1, LEVEL - 1) + 1 END), (CASE instr(x, ',', 1, LEVEL) WHEN 0 then 4000 ELSE instr(x, ',', 1, LEVEL) - 1 - (CASE LEVEL WHEN 1 THEN 0 ELSE instr(x, ',', 1, level - 1) END) END))) FROM dual CONNECT BY level <= LENGTH(x) - LENGTH(REPLACE(x, ',', '')) + 1) AS sys.odcivarchar2list)) b) SELECT col1_val2, col1_val1, col2_val2, col2_val1, systimestamp FROM (select SN, ROW_NUMBER() over(partition by SN order by RN) RN, SUBSTR(column_value, INSTR(column_value, ':') + 1) VAL1, substr(column_value, 1, instr(column_value, ':') - 1) val2 FROM instr ) PIVOT(MAX(VAL1) VAL1, MAX(VAL2) VAL2 FOR SN IN(1 as col1,2 as col2));
Any help would be appreciated.user590978 wrote:
Can you please help write the query without using the PIVOT function.
with indata as ( select 1 sn,'123:456,789,323:456,213,344,345:5454' x from dual union all select 2, 'abcd:fgrfr,rfrf,rfred,tg:tg,tg:ophhh,op,vdfgbh:poijn' x from dual ), t1 as ( select x from indata where sn = 1 ), t2 as ( select x from indata where sn = 2 ), t3 as ( select level lvl, substr( x, instr(',' || x,',',1,level), instr(x || ',',',',1,level) - instr(',' || x,',',1,level) ) col1 from t1 connect by level <= length(x) - length(translate(x,'A,','A')) + 1 ), t4 as ( select level lvl, substr( x, instr(',' || x,',',1,level), instr(x || ',',',',1,level) - instr(',' || x,',',1,level) ) col2 from t2 connect by level <= length(x) - length(translate(x,'A,','A')) + 1 ), t5 as ( select lvl, substr(col1,1,instr(col1 || ':',':') - 1) col1_val1, substr(col1,instr(col1 || ':',':') + 1) col1_val2 from t3 ), t6 as ( select lvl, substr(col2,1,instr(col2 || ':',':') - 1) col2_val1, substr(col2,instr(col2 || ':',':') + 1) col2_val2 from t4 ) select col1_val1, col1_val2, col2_val1, col2_val2, systimestamp from t5 full join t6 on ( t6.lvl = t5.lvl ) order by coalesce(t5.lvl,t6.lvl) / COL1_VAL1 COL1_VAL2 COL2_VAL1 COL2_VAL2 SYSTIMESTAMP ---------- ---------- ---------- ---------- ------------------------------------- 123 456 abcd fgrfr 23-OCT-12 11.50.12.015000 AM -04:00 789 rfrf 23-OCT-12 11.50.12.015000 AM -04:00 323 456 rfred 23-OCT-12 11.50.12.015000 AM -04:00 213 tg tg 23-OCT-12 11.50.12.015000 AM -04:00 344 tg ophhh 23-OCT-12 11.50.12.015000 AM -04:00 345 5454 op 23-OCT-12 11.50.12.015000 AM -04:00 vdfgbh poijn 23-OCT-12 11.50.12.015000 AM -04:00 7 rows selected. SQL>
SY.
-
Shares Possible without opening Raw file in Photoshop?
Is it possible to save some actions performed on a raw file without opening the file in Photoshop?
Suppose I have 250 files, all need correction lens (and perhaps other current settings) in a fundamental first step. I would like to be able to record an action that opens (1) my NEF file cab; (2) makes the lens correction, given the characteristics of the particular objective, I used; 3 [other tweak - say the noise reduction]; (4) [another tweak - say the color temperature]; and then (5) close the file generate nothing but the .xmp file.
Then when I go to work on each file, all my basic fixes were made for when I reopen it later in ACR, I did that to make custom changes before finally opening in Photoshop.
I tried a few things, scanned the forums, check the online Help Center, through some Adobe TV tutorials, but I can't understand how do.
Any help?
I'm the CS6.
I realize that this question is probably here rather than discussion of the cab. I apologize for cross posting.
Phoenix89MR wrote:
Is it possible to save some actions performed on a raw file without opening the file in Photoshop?
No.... Action is something that record something in Photoshop. Yes, an Action can save the settings of the cab... but need to eventually open the image in Photoshop and it will make the file.
What you really want to do is to examine the first camera presets and their use in bridge. Open a representative image, set the image, save a preset and then apply it to as many images as you want in Bridge. Also note, you can open multiple images in ACR, select them and adjust several images at once. You can also adjust an image in Bridge, copy the settings from one file and paste to others.
A lot of how to accomplish what you want, but not really by the Photoshop Actions.
-
Flash Builder 4 is connected ok to ColdFusion and MySQL via the generative FB CFC.
I'm trying to put the key in the table of users in a TextInput field and click a button [Get] to obtain registration.
protected function get_clickhandler (event. MouseEvent): void
{
getusersResult.token = usersService.getusers (users. USER NAME)
}
Network Monitor indicates that the getusers method works.
Then... I don't know what to do with this thing of token. How to get the data in the record so that FlashBuilder can show it.
Help would be appreciated. Reference information would be appreciated.
Kind regards
-Bill
I just figure that out last week. Here's an example, suppose there is a 'contacts' table with a 'name' and a 'name' a field 'email '...
(1) establish a connection with your SQLite DB if you have not already:
sqlConnection = new SQLConnection(); sqlConnection.open(File.applicationStorageDirectory.resolvePath("yourdbfile.db")); var sql:SQLStatement = new SQLStatement(); sql.sqlConnection = sqlConnection; getAccountInfo();
(2) the information and put them in a table:
var sql:SQLStatement = new SQLStatement(); sql.sqlConnection = sqlConnection; sql.text = "SELECT first_name, last_name, email FROM contacts WHERE id = 1 LIMIT 1;"; sql.execute(); var contactInfo:Array = sql.getResult().data;
3) direct access to the data or assign to variables:
var firstName:String = contactInfo[0].first_name; var lastName:String = contactInfo[0].last_name; var email:String = contactInfo[0].email;
I hope this helps...
-
The sidebar to view the columns of the table without opening table
In earlier versions of SQL developer, when I clicked on the button "expand" next to a table, it would be a list of columns that the table had without open the table in the main window. If I right click on the name of the table, there are open table.
Is there a way to get 2.1 to return to this behavior?Open objects with a single click Explorer to be controlled through tools | Preferences | Database | ObjectViewer | Open the object by a simple click. I have it turned off and that it must be a double click on the name or right click and select open before the opening of the object browser. However, even with this, I need to click on the name of the object (not the 'expand' button) before the object viewer opens. By clicking on the button "expand" always expands the list of columns and open object viewer regardless of the value of preference.
theFurryOne
-
How do you delete an account without opening Thunderbird?
I'm having a problem where whenever I open Thunderbird (38) it freezes. I am convinced that the problem lies with my Comcast email account, I created a new profile and that you have NOT configured the account from Comcast and Thunderbird worked without problem.
This problem occurs on 2 different PC from Windows using different versions of Windows (8.1 year 10)
How can I remove the account from Comcast without opening Thunderbird?
Thanks in advance for your help.
I solved this is another way - although I "lost" my emails from Comcast.
I contacted Comcast and they had apparently changed the ports and it was enough to mess things up for me.
I got the new server incoming and outgoing of them info.
Created a new profile and set it to my personal email. Once inside, I created the account of Comcast.
I think that they also shifted a pop to an imap - or at least that's what I've done with.
The ports for those who have this problem - 993 IMAP and 587 (different from the default).
Other than that, it would be always useful to know how to enter the account settings without opening Thunderbird.
-
How can I delete a rogue email without opening it?
Sometimes I receive unsolicited emails from parties and I do not know how to remove them without opening the emails said.
You can right click and select Remove from the context menu.
Personally I wouldn't worry about the possible risks of opening suspicious messages in Thunderbird. The worst that can happen as far as I KNOW is a webbug account that I opened it. Thunderbird don't run scripts and you have to click on anything actually fire.
-
How do I deleat an e-mail without opening it
How can I delete an e-mail without opening it
Right-click and select Delete.
-
I created two tasks and assign channels programmatically. This happens in my vi initialization. I am looking for common tasks programmatically so that I can close them all in my close vi. I tried the DAQmxSystem property node - tasks, but it only gives me the tasks that are saved in MAX. I have created my task incorrectly? Without having to store the open tasks, is there a way to get a list of open task? My boot VI is attached.
I figured this out. I added the SaveTask vi to my vi initialization so that task appears when I query using the property node.
-
Dear Hi
I have a problem in xp, and it is when I click on h & s Center, nothing happens and in process Explorer helpctr.exe file appears and automatically close also when I opened Babylon dic he can open, but it's the plot of results is empty and so when I open hotspotshield anonymous app it works but I don't see it's page (gui) and when I want to install it installation page opens but I can't see his images and they are virgins, and only Setup/cancel buttons are there, do you know what is the reason?Oooooops, I found the solution .my problem was ' help & support center couldn't open and nothing happened to the screen & flash programs and disappear immediately or open with empty frames.
After a few days trying to understand the reason without result, I reinstalled IE and suddenlly evrey thing came ok. try it! -
Original title: Task Scheduler
When I open Task Scheduler and click on MSE for planning, I get the following warning.
General Initializatin page failed,
The specific error is:
0 x 80070534: no mapping between account names and security IDS was done. Year error has occurred trying to retrieve task account informaiton. You can continue to edit the subject of the task, but will not be able to change task account information.
I then press the ok button and it goes to the task, schedule, and the settings box.
When I check in scheduled tasks, to see if they ran as planned, the last run time column NEVER said, and the status column indicates
COULD NOT START.
In the morning, I always get this error message:
A task could not run...
Do you know what I'm doing wrong? Can it be fixed?
Thank you Tim
Is there a password the user account in which the task is scheduled? You cannot schedule a task to run under a user without password account.
You can also take a look at advanced > view the log window scheduled tasks.
Maybe you are looking for
-
Empty DVD compatibility with burner on SP P100
I have a Satellite Pro P100-309 and want to know what blank DVD is compatible with my burner. Thank you
-
Hello: IE 6 on HP laptop/XP Media Edition. 'Search' on the left side of IE is absent, although 'Search' in the address bar is OK active and functional. The opening of 'Research' by clicking on 'Search' icon at the top of IE, 'Google' popping up and s
-
C1100 question Fan (CS24-TY)
Hello I recently acquired a machine CS24-TY, and there fan problems a few months after that it has been installed. The unit will run all fans of system at 10 000 rpm + and rev then down to about 1000 rpm, it continues the process forever. This happe
-
I'm on Windows 7 Pro X 64. When I try to move a file or when I try to delete a folder, and try to do a lot of other normal operations, said Explorer that it has stopped working, will try to find a solution... It happens so frequently, I can hardly us
-
Beta4 - can't deploy with QDE more?
I can't deploy applications using the IDE (beta4) more, an error message appears: Failure of deployment: Info: request shipment: install and launchInfo: Action: install and launchNews: Native debugging: onInfo: File size: 20548379Info: Installation o