MAX DateTime Not working
SELECT MAX(DateTimeAdded) OVER(PARTITION BY PatientID ORDER BY DateTimeAdded)as DateTimeAdded
FROM ClinicalVitalGroup CVG_D
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'OVER'.
Why is this not working???
GROUP BY looks for unique value combinations of entire columns specified, so when you add one more column the column combination changes and it looks for the unique combination of all columns together. So combination of values for PatientID and
ClientVitalGroupID will still be unique though if you look at PatientID individually you
may see duplicates.
See this small illustration to understand it
declare @t table
Col1 int,
Col2 int,
Col3 varchar(10)
insert @t
select 1,2,'Test' union all
select 1,3,'qwerty' union all
select 1,3,'blah blah' union all
select 1,4,'jbj' union all
select 2,6,'jkhk' union all
select 2,8,'kkjkl' union all
select 2,8,'kljklj' union all
select 2,11,'kklljl'
select Col1,COUNT(*) AS Cnt
from @t
group by Col1
The above code will return just two records as you've only two unique values for COl1 field (1 and 2)
See output below
Col1 Cnt
1 4
2 4
Now add col2 also to group by and see
You will get 6 records as there are six unique combinations for Col1 and Col2
ie (1,2),(1,3),(1,4),(2,6),(2,8),(2,11)
see
declare @t table
Col1 int,
Col2 int,
Col3 varchar(10)
insert @t
select 1,2,'Test' union all
select 1,3,'qwerty' union all
select 1,3,'blah blah' union all
select 1,4,'jbj' union all
select 2,6,'jkhk' union all
select 2,8,'kkjkl' union all
select 2,8,'kljklj' union all
select 2,11,'kklljl'
select Col1,Col2,COUNT(*) AS Cnt
from @t
group by Col1,Col2
The output is
Col1 Col2 Cnt
1 2 1
1 3 2
1 4 1
2 6 1
2 8 2
2 11 1
If you analyze any one column again (Col1 or Col2) in above output you can see the value duplicating as GROUP BY just ensures the
full combination of values being unique rather than the individual values themselves
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Similar Messages
-
max-conn in FOIP is not working properly. Even after i set max-conn to 1, possible to make 2 simultanious faxes to the specific dial-peer.
Anyone know how to change the FOIP TIF attachemnt name (Cisco_fax.tif) to other name?This command applies to off-ramp Store and Forward Fax functions. verify you are using On Ramp or Off Ramp
-
Max is not working in infopath form 2010
Hi,
I have created one form in infopath 2010.
I want to get maximum id of a table when i click on new record.
I am trying to use max() function for the same.
But its not working for me.
Please help to solve the issue.
Thanks in advance!
Regards
RajniHi,
According to your post, my understanding is that you want to get maximum item id of list in InfoPath 2010.
Here is a blog for your reference:
Auto-Numbering InfoPath Forms
http://claytoncobb.wordpress.com/2009/06/15/auto-numbering-infopath-forms/
Best Regards
Dennis Guo
TechNet Community Support -
Tween Max AS3 Not Working on Root of loaded SWF
I have a project where I'm loading a SWF into another Shell SWF and I've run into a strange bug. Tween Max works in the compiled clip everywhere, but on the root of the loaded SWF. It's not erroring out, it's just not tweening anything?
Here's the code for the loader in the Shell...
stop();
//Import the required assets
import flash.display.*;
//Stop the playhead while loading occurs
var ldr:Loader = new Loader();
var url:String = "12com2682-value.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
//Create a listener to call the loading function as the movie loads
ldr.contentLoaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING2);
function PL_LOADING2(event:ProgressEvent):void {
loader_txt.visible = true;
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
//Display the % loaded in textfield
loader_txt.text="loading:"+int(pcent)+"%";
//If the movie is fully loaded, kick to the next frame on the main timeline
//You may wish to change the gotoAndStop(2) to a gotoAndPlay(2)
if(pcent==100){
mc_loadscene.addChild(ldr);
loader_txt.visible = false;
this.loaderInfo.removeEventListener (ProgressEvent.PROGRESS, PL_LOADING);
then in the loaded SWF, I have:
stop();
import com.greensock.TweenMax;
import com.greensock.plugins.*;
TweenPlugin.activate([AutoAlphaPlugin]);
import fl.transitions.easing.*;
//////mc_host is a movieclip holding a video
TweenMax.to(mc_host, 1, {scaleY:1, scaleX:1, delay: 2.5, ease:Back.easeOut });
//////mc_sidert is another movieclip
TweenMax.from(mc_sidert, 2, {y:"-600"});
Anybody else running into this error?you must be doing something wrong because that code works as expected for me: http://www.kglad.com/Files/forums/test2.html and http://www.kglad.com/Files/forums/test2.fla
p.s. please mark helpful/correct responses. -
Function MAX is not working in xsl
Hi ,
iam facing a unique issue
i want to print maximum postion by using the function MAX
My style sheet is working fine in Jdev but same XSL sheet is giving error when i run it in oracle Applications.
below is xsl logic
<xsl:template name="ttpgds" match="ARXEURSL" mode="temp2">
<xsl:variable name="x">
<xsl:for-each-group select="G_ROW[INTRA_EU_TRX_CODE =('GOOD')]" group-by="concat(VAT_TAX_NO,BILL_CUST_NAME,INTRA_EU_TRX_CODE)">
<CHKPST><xsl:value-of select="position()"/></CHKPST><xsl:text>
</xsl:text>
</xsl:for-each-group>
</xsl:variable>
<xsl:for-each select="$x">
<xsl:variable name="jCount" select="max(CHKPST)"/>
<xsl:value-of select="ceiling($jCount)"/>
</xsl:for-each>
</xsl:template>in oracle applications iam getting below error:
Caused by: oracle.xdo.parser.v2.XPathException: Expected ')' instead of 'CHKPST'.
Any suggestions?
Thanks
AnilThe JDeveloper probably has a differnet vesion of the XDK - we have to be careful of the uptake of new versions to make sure we don't have any regressions.
<?xslt:maximum?> in the RTF becomes
<xsl:value-of select="xdoxslt:minimum(.//Measures.Dollars)" xdofo:field-name="xdoxslt:minimum(Measures.Dollars)" />
with:
<xsl:stylesheet version="2.0" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.xdo.template.rtf.XSLTFunctions">
Of course that works ONLY in xml publisher. I also would strongly recommend that you try the RTF templates.
Klaus
Edited by: KlausFabian on Mar 17, 2010 1:08 PM - correct typo -
Add-dayTimeDuration-to-dateTime not working just before format-dateTime
Hi,
I am using format-DateTime function just after add-dayTimeDuration-to-dateTime function in XSLT mapping.
But the response coming doesnot providing the result of add-dayTimeDuration-to-dateTime function.
When I use both the functions individually then both works fine.
Please let me know any solution for this.
ThanksHi Arpit,
Can you try converting the output of add-dayTimeDuration-to-dateTime to string, before passing it to format-DateTime.
Also can you post your piece of xslt that you are trying to work out with an example.
Please do mention what exactly you are trying to do.
I have tried this and its working fine.
<xsl:value-of select="xp20:format-dateTime(string(xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'PT15S')),'[D01]/[M01]/[Y0001]')"/>
Please let me know if this helps.
Thanks,
Deepak. -
Query Limits - Max Time not working
A Max Time Query Limit has been set for a DB but it never acknowledges it and the query carries on running in the underlying DB even after cancelling the query, and closing the browser.
Has anyone seen this before? The Max Time is enabled, and the connection is always via a shared user.Hi,
Try this below link
http://shivabizint.wordpress.com/2008/10/02/to-avoid-request-cancelled-message-when-running-long-reports-in-obiee-answers
Regards
Naresh -
FF shows that it is loaded but the website will not come onto the screen. When I put the mouse on the icon, the website is there, apparently to be opened. I click on it, screen flickers and nothing but still showing on icon. I right click, select maximum, and nothing. I was on 3.6.15, upgraded to 3.6.16 and not to 3.4. They are all doing the same thing. I uninstalled FF and reinstalled. Still nothing.
OK, I found a way to do this. Might not be the best way, but it turns out that I can put a addEventListener(MouseEvent.MOUSE_UP, gottaMouseUp) in the calling class, add a public variable in the button class that lets me know if the correct button has been clicked, and use that in the calling class to decide which button was clicked. I knew it was something simple like that....
-
Why does the counter work in MAX, but not Labview?
Please help, I have been away from Labview for over 3 months, and I am quite rusty....
Last year, I successfully configured NI9401 to measure period (seconds) by counting the rising edges of my sensor signal. Since then, I have aquired a new PC, and loaded all my software into it, including the Labview VI's that successfully worked on the old computer.
I can see the digital signal using MAX and the test panel for the NI9401, so, I know my wiring and my TTL signal is OK, but, when I try to run the attached VI, nothing happens except the error below.. How do I tell this VI to look for the signal on MOD3/CTR0 and channel 14?
Thanks. I am sure it is a small adjustment...this worked fine a few months ago...not sure what is wrong now.
Thanks,
Dave
Solved!
Go to Solution.
Attachments:
continuously measure period buffered_singlechannel_forum_feb_23_2012.vi 20 KBOK, now. Resolved the issue. The vi is fine, but, some shaky wires were identified...worked in MAX but not in the vi. Now that the connections have been tightened up, it works for both. Sorry for the inconvenience.
Dave -
Tata Photon max on Huawei EC 315 is not working on Mac OS X 10.10
Hi All!
I have bought a Tata Photon max WiFi (Huawei EC 315) dongle, which is not working on Mac OS X 10.10.
Does anybody know what is the problem?
Do I need a different dialer?
Do I need a new driver for the Huawei dongle?
I didn't find satisfying solutions on Tata or Huawei homepage!
Who can help me to get this run?
I would be happy to get any feedback on my questions.
Thanks in advance for your comments.
MacMoeHello, please check this step by step video tutorial youtube to solved problems huawei modems on mac os x 10.10 Yosemite....Works perfectly!!! :-)
https://www.youtube.com/watch?v=jBM8qoV9VkM -
I have just bought a new TATA PHOTON MAX, but, this is NOT working on my MAC LION 10.7.4.
I was using a Reliance Netconnect+ and that was working on the same machine. Kindly suggest if there is a way that the TATA PHOTON MAX can work on this.
Thanks!!!Contact the maker of that product.
-
Do I have to buy Lion or snow lepoard or is there a way to updated from OS X 10.4.11?? I have a new ipod that will not work without the ne itunes, but the new itunes will not install without a newer vesion of Max OS X. Help please
Need to know your Mac model. If it's a PowerPC, the max OS is Leopard 10.5.x. If it's an Intel procesor, you can upgrade to Snow Leopard (for $29) & later to Lion.
*Mac OS X 10.5 Leopard installation system requirements*
http://support.apple.com/kb/TA24950
Leopard is no longer available at the Apple Store *but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753)*.
Installing Mac OS X 10.5 Leopard
http://support.apple.com/kb/HT1544
Mac OS X 10.5 Leopard Installation and Setup Guide
http://manuals.info.apple.com/en/leopard_install-setup.pdf
After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
Cheers, Tom -
Max Memory Settings Not Working (SQL Server 2008 R2)
I have 12 GB ram in sql server 2008 R2 of 64 bit server (Windows 2008 R2).
I have set the Max memory setting to 12288 MB Memory setting.
Still the usage of sql server process is around 14 GB.
Is Max memory setting not working?
I have also enabled AWE after all it is 64 bit.
ThanksProblem is that: my OS is halting due to this RAM. I have 16 GB of ram and assigning 12 GB to SQL SERVER and rest is using for OS. Please guide me how to get information about actual memory usage from all sql server processes. like
all CLR etc
Hi,
Are you also running SSIS/SSAS/SSRS with database engine services. What do you mean by OS is halting ?
If you want to check whether SQL Server is facing memory crunch please have a look at perfmon counters from
this link
Sys.dm_OS_memory_clerks would be DMV helpful in tracking memory utilized by various processes
I have also enabled AWE after all it is 64 bit. Thanks
Please note AWE doe snot have any notable affect in 64 bit system.
Below will tell you memory used by SQLCLR
select single_pages_kb + multi_pages_kb + virtual_memory_committed_kb from sys.dm_os_memory_clerks where type = 'MEMORYCLERK_SQLCLR'
Below query will give you memory consumed by various clerk
SELECT type, SUM(multi_pages_kb)
FROM sys.dm_os_memory_clerks
WHERE multi_pages_kb <> 0
GROUP BY type
ORDER BY SUM(multi_pages_kb) DESC
Can you reduce max server memory to 11 G and see if it gives some relief
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
en
I´ll check the messages. Elements 4.0.
Peter
9 dec 2014 kl. 18.44 skrev Jeff A Wright:
I have an I-mac with Max OS X vers. 10.6.8. Have tried to install both an old Photoshop 7.0 and an Photoshop Elements but it does not work. 7.0 I bought many years ago end the Elements came with a Canon scanner. What to do? Regards Peter Lindgren
created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
Peter Lindgren do you receive any specific error messages when you attempt to install Photoshop 7 or Photoshop Elements? What version of Photoshop Elements are you installing?
If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/6999366#6999366 and clicking ‘Correct’ below the answer
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/6999366#6999366
To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Community
For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624. -
MSI GNB MAX and RICOH R5C476II PCI to Cardbus bridge not working! Help
Why my PCMCIA & CARDBUS Card Reader based on RICOH R5C476II Chipset not
working on MSI GNB MAX BOARD (with newer bios 2.3)???
My Card reader is fine and working properly on many ithers motherboards like: ABIT BD7-II based
on Intel 845E Chipset, or ASUS TUSIM, ASUS TUSL, and ASUS PIIIB-F
Why ??
Please help me.Yes, sure. I'm trying to use all of five PCI slots, and after slot chnge I,m setting Reset Configuration data in BIOS.
result is the same in all Card positions. Card is detected, but not working corectly.
I'm trying to resolve any hardware conflicts by disabling all od internal mothebrord components like IEE1394 Audio, Serial Ata and others - no cahnges, no solutions ....
Maybe you are looking for
-
Windows 2012 & 8.1 ADMX with Windows 7 System
Hello, We are a Windows 2008R2 & Windows 7 Ent Shop with System Center 2012 R2 & PKI Servers. We need to deploy 30 Windows 8.1 Enterprise Lenovo Tablets to the field. Would all our Windows 7 GPO still work if we upgrade/update our Central Store with
-
Black screen after login on my Satellite U500-1f5
After I logged into my laptop, the screen went blank like completely black with just the cursor showing. I can start the task manager but nothing else. I tried safe mode and it worked fine. This only occurred in normal mode. So, I had to do a system
-
Drop down menu in IE moves to the right
I am using the SPRY in a menu for a client and in IE the drop down elements show to the right. When I view them in any other browser the are fine. I made all changes to the SPRY CSS in a separate CSS file. I have commented out the additional CSS f
-
buy more RAM or faster cpu for video editing?
-
Multiple objects created in loop
How do I create multiple objects for the same class with a loop I can hard code the names in but I want to allocate names from an array as the names ie BankAccount Acct(NameArray[0]) = new BankAccount(); to get AcctFred.method(); and access this in a