Making MySQL ORDER BY link dynamic in URL
I would like to have a dynamic table sorted by a dynamic URL.
I have found this script but I am not sure where I am meant
to put the DECLARE?
This is the MySql recordset:
BEGIN
DECLARE @SortOrder tinyint
SET @SortOrder = 2
SELECT *
FROM products
WHERE `Section` = colname OR `Department` = colname2
ORDER BY CASE WHEN @SortOrder = 1 THEN Code
WHEN @SortOrder = 2 THEN Name
ELSE Order
END
I get an error saying this:
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to
use near 'DECLARE @SortOrder tinyint SET @SortOrder = 2 SELECT *
FROM products WHERE `Sec' at line 2
Any ideas? And in the script what does the number 2 in this [
SET @SortOrder = 2 ] refer to? Two CASES?
I don't know for sure, but one thing I see is that you are using an alias which has the same name as the column:
DATE_FORMAT(date_created, '%m/%d/%Y %l:%i %p') AS 'date_created',
Then the order by clause is using that same column/alias. Maybe this is confusing MySQL? If MySQL supports alias's based on functions in the order by clause, you might want to change that alias name to something else, like date_created_alias and use that in the order by.
Otherwise, try using the complete function in the order by clause:
ORDER BY DATE_FORMAT(date_created, '%m/%d/%Y %l:%i %p') DESC
But in any case, it sure seems like it should be sorting correctly the way you are currently handling it.
Similar Messages
-
I have an issue with specifying a URL or File name in Properties/Action/On Success.
I want to link a video to another video, both of which are in the same directory folder.
After I type in the path name and publish the project, I test it on my C drive and all works well.
I then move the published file and the linked video (published) file to another drive, and the link doesn't work any more.
On the error message I see that it's trying to access my C drive and not the new drive.
Eventually I need to put copies of these file on two different servers and I don't want to constantly updated the URL/File name to do so.
When I create a web page with hyperlinks and move them to another drive, the links dynamically regenerate. This is not happening with Captivate.
Does anyone have a solution or work around?Welcome to the forum.
Unfortunately, you have posted to the PrElements forum. PrE is a consumer-level video editing program.
You want to post to the InDesign Forurm instead.
Good luck,
Hunt -
Dispute Case - Linked Objects- Various- URL
Hello,
We have a requirement to create a Dispute Case through a custom interface program. We have been doing this using BAPI_DISPUTE_CREATE.
Now, I need to programmatically link a URL to Dispute Case -> Linked Objects->Various->URL. An custom element type for u2018URLu2019 was configured in the Registry for this in our SAP system.
This is usually achieved programatically using the tables parameter OBJECTS of the BAPI. We have to pass the OBJ TYPE & KEY to this parameter.
Since configuration does not allow the BOR_TYPE to be defined on tab u2018Connection Parametersu2019 of the Element Type URL in the Registry, what OBJTYPE and KEY works for this?
Thanks,
Smitha/AneelHello Andy,
I have a question. We're also trying to use BAPI_DISPUTE_CREATE in order to create dispute cases, but the function needs a unique GUID number in order to create the dispute case. How did you manage to maintain this guid number?
Because of this problem, we started using the function UDM_DC_CREATE, which generates a GUID itself, if you do not maintain one.
Sorry for the inconveince, the problem was because of a wrong attribute, I can create a dispute case with this function without maintaining the guid id.
Edited by: Karabiber Kerem on May 21, 2010 11:03 AM -
How to create Links dynamically
Hello,
I've tried for several days to create links dynamically, and
I can't get it work out.
Here is what my application do : in a
viewstack, I create dynamically some
canvas as children of the viewstack. The number of canvas
depend on the number of items in an arraycollection.
Creation of a canvas (included in a "for" loop):
Objet_Courant = Curseur.current;
var canvas_cible:Canvas = new Canvas;
canvas_cible.id = "CN_"+i;
canvas_cible.width = 315;
canvas_cible.height = 160;
ViewStack_cible.addChild(canvas_cible);
I inject content in each canvas the same way :
var newModele:Text = new Text;
newModele.id = "MODELE_"+i;
newModele.text = (Objet_Courant.modele) as String;
canvas_cible.addChild(newModele);
And now my question (at last) : I would like to create links,
for example on the text item. The URL of the link would come from
the arraycollection, as the other datas I use.
Does anyone have a clue for this ?
Thanks in advance.I still get stuck with this problem, even several months
after... I had the same problem with creating links on images, when
I dynamically create Tilelists with images as an ItemRenderer. How
can we associate links with the images ?
Any kind of help would be great :) -
HELP troubles with dynamically generated URLs
I'm trying to integrate a new shopping cart, but DW CS4 can't follow the dynamic links in the template pages. They render fine in Live View. I can follow the CSS in the CSS Styles panel, but of course, it's not editable. Related files are far from complete and if I try to click on one, I get an error that the file can't be found.
The templates all contain dynamically generated URLs such as:
<?php include("${__TPL_DIR__}pages/templates/part.header.tpl.html"); ?>
The .ini files used have site root relative references.
Any ideas? Or am I stuck limping along?Thanks David,
I found a few articles in the Developer Center that were helpful in understanding what I was looking at. The articles on creating Drupal and Wordpress themes explained how the pages are created dynamically, as well as how to use DW to modify and create themes. Though the specifics are different than what I am looking at, the concepts are similar. They also confirmed that attaching the relevant CSS files as design time style sheets was a practical workaround in the absence of an add-on to help DW understand the site structure. I was hoping that I had just not done something correctly, but I can live with a workaround, knowing that an "easier" way isn't just waiting for me to learn something about DW.
Don -
Safari fails to update followed links dynamically
I mentioned this a while ago and am surprised that Apple continues to produce perhaps the only browser which fails to update followed links dynamically.
The bug is best illustrated with an example. Hit this URL:
http://www.google.co.uk/search?num=100&newwindow=1&q=apple
and then try one or two links on the resulting Google page.
All other browsers I have tried update the followed links on the Google page dynamically without it being reloaded but Safari does not.
I do not use tabs and am not sure if those using tabs will be aware of the bug.
This is the only thing which stops me using Safari as my default browser.
I would be grateful if others can confirm that they also get this bug.Many thanks bdash.
I am surprised it was not included with this week's Safari 3.2.1.
I have just tried iCab and the result is consistent with it being a WebKit issue.
The original bug report that you linked to compared Safari with Firefox but, from memory, with the exception of WebKit virtually all browsers produced from at least 5 series onwards have dynamically updated followed links.
I will put a link to this thread on
http://discussions.apple.com/thread.jspa?threadID=1702301
and any other pages about this issue which I come across.
Thanks again for your timely helpful reply - I will mark this as 'answered'. -
Error while Making Sales order Ref. to quaotion by increasing Qty.
Hi,
We are making quaotation for customer for qty 1 pcs, and after that ref. to that quotaion we are making Sales order and in sales order we are increasing the qty. as per customer PO means if we amke Quatation for 1 qty we are making Sales order for 3 qty but system is giving error that Quation qty. is less than sales orser qty. Difflict qty. 3 no to 1 no.
this error we are getting now previous we were working on same scenario and it was working fine so where is the meaasge setting for this.
regards,
zafarHi,
The message for yours is V1494
The message V1494 is hard-coded as Warning and Information message in the includes
FV45PF0V_VBAP-ZMENG_PRUEFEN_VO and FV45EF0V_VBEP-WMENG_PRUEFEN_VO. Therefore it is not possible to set them as Error message in Customizing. The only option you have is to MODIFY the standard Code to get an ERROR message.
All the V1 Error Messages are Standard Messages and not able to change in Customizing.
regards,
santosh -
Use of SOAP Receiver Adapter in a recursive way with dynamic Target URLs
Hi all,
I have a following scenario.
1. I have to call a webservice with a URL http://myserver.com/default.aspx?action=index
This will return a list of xml filenames as below
<?xml version="1.0" encoding="UTF-8"?>
<filelist>
<file uuid="test1" />
<file uuid="test2" />
<file uuid="test3" />
<file uuid="test4" />
</filelist>
2. Now I have to call the same webservice with a change in action so that the url looks like
URL - http://myserver.com/default.aspx?action=fetch&uuid=
for all the filenames in the list
So in essence, I have to create a dynamic URLs recursively like
http://myserver.com/default.aspx?action=fetch&uuid=test1
http://myserver.com/default.aspx?action=fetch&uuid=test2 and so on
3. And with each call to the URL in step 2, the incoming xml is to be mapped to an IDoc.
I will be creating a ABAP proxy to initiate the calls.
I would like some ideas so as to have a less complex approach to the solution.
Regards,
NeerajHi,
dynamic SOAP URL - adapter specific properties (http receiver adapter)
Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","THeaderSOAPACTION");
String a = http://something.abcd/applicationName/xmlMessage //set the value of actual action here
conf.put(key, a);
return ""; -
Order by clause Dynamic in Oracle function
How can i get order by Clause Dynamic in Oracle function
My function Returns sql query with SYS_REFCURSOR . and i will pass the order by column as input parameter
create or replace
FUNCTION TEST_SSK
p_srot number
RETURN SYS_REFCURSOR
AS
C_testssk SYS_REFCURSOR;
BEGIN
OPEN C_TESTSSK FOR
SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER
order by P_SROT;
return C_testssk;
end;Edited by: user10736825 on Dec 22, 2010 11:34 AMyou can go for a dynamic query ;)
create or replace
FUNCTION TEST_SSK
p_srot number
RETURN SYS_REFCURSOR
AS
C_testssk SYS_REFCURSOR;
l_str VARCHAR2(4000);
l_order VARCHAR2(100);
BEGIN
l_str := 'SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER ';
IF p_sort = 'LC'
THEN
l_order := ' ORDER BY LOAN_CODE ';
ELSIF p_sort = 'LD'
THEN
l_order := ' ORDER BY LOAN_DATE ';
END IF;
l_str := l_str || l_order ;
OPEN C_TESTSSK FOR l_str;
return C_testssk;
end; -
Alphabetically ordering a Linked List
Would anyone please be able to give me help in ordering a linked list alphabetically. I'm new to java so please be gentle.
Many thanks in advance.I've just tried that but it gave me errors on trying to compile it:
.\List.java:91: Incompatible type for method. Explicit cast needed to convert List to java.util.List.
Collections.sort(leftList);
^
.\List.java:92: Incompatible type for method. Explicit cast needed to convert List to java.util.List.
Collections.sort(rightList);
^
2 errors
I'll post my coding below to see if you can help me out. Thanks a lot.
import java.util.LinkedList;
import java.util.Collections;
class ListNode {
// package access data so class List can access it directly
char data;
ListNode next;
// Constructor: Create a ListNode that refers to Object o.
ListNode( char c ) { this( c, null ); }
// Constructor: Create a ListNode that refers to Object o and
// to the next ListNode in the List.
ListNode( char c, ListNode nextNode )
data = c; // this node refers to Object o
next = nextNode; // set next to refer to next
// Return a reference to the Object in this node
char getChar() { return data; }
// Return the next node
ListNode getNext() { return next; }
// Class List definition
public class List {
private ListNode firstNode, current;
private ListNode lastNode;
private String name; // String like "list" used in printing
// Constructor: Construct an empty List with s as the name
public List( String s )
name = s;
firstNode = lastNode = null;
// Constructor: Construct an empty List with
// "list" as the name
public List() { this( "list" ); }
public synchronized boolean isEmpty()
{ return firstNode == null; }
public synchronized void insertAtBack( char insertItem )
if ( isEmpty() )
firstNode = lastNode = new ListNode( insertItem );
else
lastNode = lastNode.next = new ListNode( insertItem );
print();
// System.out.println(insertItem);
// public char getText(){
// return current.data;
// Output the List contents
public synchronized void print()
current = firstNode;
while ( current != null ) {
System.out.print(current.data);
current = current.next;
System.out.println( "\n" );
// method to split the linked list
public synchronized void splitList(){
System.out.println("splitList");
ListNode present = firstNode;
List leftList = new List(); // create the left list
List rightList = new List(); // create the right list
try{
while (present != null) {
leftList.insertAtBack(present.data);
System.out.println("left " +present.data);
present = present.next; // skips 1 node
rightList.insertAtBack(present.data);
System.out.println("right " +present.data);
present = present.next; // skips 1 node
Collections.sort(leftList);
Collections.sort(rightList);
catch(NullPointerException e){ -
Linking Dynamic text boxes?
Hi there,
This might be straight forward, but I would like to know how could one link dynamic text boxes so that the information would flow? In a way, the information would flow from:
(XML) Input A into BOXA00, BOXA01, BOXA02, BOXA03, etc.
(XML) Input B into BOXB00, BOXB01, BOXB02, BOXB03, etc.
(XML) Input C into BOXC00, BOXC01, BOXC02, , BOXC03, etc.
Any takers?Hi i recently have made a function that can calculate the amount of text that will fit into a specified text box. See my attached file. Notice that the box will only accommodate the text in red since that is the maximum it can display.
"This here one is a very very very long long long text that cannot really fit completely into this box so we will have to cut it at some index point"
My function getTextExtent will return an object with properties
nIndex -> which determines the index at which the text will be delimited
fExceeded -> is true if the text is longer than the allocated height of the text field. -
Hi,
I have an easy question. I would like to have a little question mark-image on my view. And this image has an link to an url. So I would like to push this image, and a new browser-window opens.
I only found the Layout-element "LinkToUrl". But with this element I don't have an image.
How does it works in Webdynpro? In HTML it is very easy...Hi,
Change the layout to grid type and then scroll down. You will find "layout[GridLayout]" set col count here to the number equal to total number of buttons + 2.
Then click on link and in the properties scroll down and set col span = 2.
and hAlign = right.
this will do the required.
and the flowdata is coming in your container's properties because this container is also present in one of the transparent container which is having layout as flow layout.
Regards,
Sarbjeet. -
SOAP adapter and dynamic target URL
My scenario: synchronous communication ABAP Proxy <=> XI <=> External WebServices.
There is a need to have configurable (dynamic) target URL for SOAP Adapter. This target should be configurable from ABAP Proxy. Any idea how can I achieve my goal?
Some additional notes why I need configurable target URL. I've multiple WebService instances which has identical interfaces and the only difference is target URL. I see no need to define for each webservice different SOAP Adapter. The other thing is that customer want to have configuration of destination (target) url on backend system (where ABAP Proxy is used).Check http://help.sap.com/saphelp_nw70/helpdata/EN/29/5bd93f130f9215e10000000a155106/frameset.htm
It's possible to set the URL for Soap dynamically.
To process adapter attributes in the message header of the XI message, set the Use Adapter-Specific Message Attributes indicator and the Variable Transport Binding indicator.
You can evaluate the following attributes in the message header:
Description: You can set the entire URL.
Technical name: TServerLocation -
APEX... Link to open URL in a new window
I have one of my interactive reports' column linked to a URL... so when my user click on the link it opens an associated webpage...
How can I make it to open in a new window...
ThanksHi,
I am trying to open my page as a popup without refreshing the parent window.
Here is what i have done
1. created a navigation bar entry for help
2. pointed the entry to a page in the application
3. opening the page as a popup with the following code in it.
javascript:window.open('&WORKSPACE_IMAGES.APEX_Reporting_User_Guide.pdf#&P0_PAGE_NAME.','popup1');
my help page opens as a popup, but also refreshes the parent window with a blank screen.
i also tried a few other options
javascript:window.open('&WORKSPACE_IMAGES.APEX_Reporting_User_Guide.pdf#&P0_PAGE_NAME.','popup1');void(0);
javascript:window.open('&WORKSPACE_IMAGES.APEX_Reporting_User_Guide.pdf#&P0_PAGE_NAME.','popup1');return false;
but none of these are helpful
Am I going wrong somewhere?
Thanks
MM -
How to get Dynamic Converter URL
Hi all
I need to get dynamic converter url of document like http://<localhost>:<port>/cs/idcplg?IdcService=GET_DYNAMIC_CONVERSION&dID=7411.
I use DOC_INFO_BY_NAME and i can find document url using 'DocUrl'. But i cannot find anything about dynamic converter.
How can i get the url just using RIDC?
Best Regards
QianHi ,
Whether i can get which format will be converted(convert format in Dynamic Converter Admin Configuration Setting) ?
This is applicable for the UI alone where in all the formats that you want to have "HTML" option shown will be added from the above option .
As for getting Dynamic Conversion using the IdcService , all of the contents can be used irrespective of whether they are added in the DC Admin section or not . So if you want to show the HTML format then all you need to do is to call the GET_DYNAMIC_CONVERSION service and pass the dID of the respective contents .
Thanks,
Srinath
Maybe you are looking for
-
Error in executing RSAN_PROCESS_EXECUTE in background
Hi All, While executing RSAN_PROCESS_EXECUTE for APD in background, the job is cancelling with error "You must enter a Date Range, to run this report". But when executing in foreground or directly executing APD in RSANWB tcode, its executing succes
-
Please let me know how I can drop RAC database in silent mode using response file. Please reply me in clear steps. Thanks in advance.
-
Process in C# with Windows Service Account
Hi, I would like to launch SQL Server Management Studio from C# Process Class thru windows service account. When I start the process, I got the in Win32Exception ( "Logon failure: unknown user name or bad password"). I verified the User credential
-
InDesign CS3: Problem with Trial
Hello, I have no tried installing the trial on three different machines and have gotten this message each time I have tried to launch the program and begin the trial: "A problem was encountered while trying to load the trial period for Adobe InDesign
-
Is it me, or has Pages lost it's ability to do a multiple non contiguous selection ?