IS there any way to pass a value in the view as a variable

Hi
I have 2 views and 1 view on top of them that calls the 2 views e.g.
View1
select ename, deptno, date from emp;
View2
select sal, date from salary;
view3
select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
sql query
Select * from v3 where date='10-AUG-2007'';
ITs taking a while is there any way that I can define the V3 as follows
view3
select v1.ename, v1.deptno, v2.sal from view1, view2 where v1.date = SOME VARIABLE and v2.date=SOME VARIABLE;
and then at the sql plus level can i use it like
I have 2 views and 1 view on top of them that calls the 2 views e.g.
View1
select ename, deptno, date from emp;
View2
select sal, date from salary;
view3
select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
sql query
Select * from v3 where date='10-AUG-2007''; can this date be passes as a variable in side the view definition.

Setting up a view which contains a substiutution variable

Similar Messages

  • Need help with a calculated column - is there any way to reference a value in the current row?

    Hey guys,
    I'm a bit of a DAX newbie, and I'm running into a block. I'm creating a Power View report about IT tickets. We are going to be creating a cube to automate the data soon, I'm currently working with a flat Excel Data Table of data to demonstrate the Power
    View reporting capabilities to the team. I need the default display to show the top 4-5 items basked on the Ticket Count. The three applicable columns I'm using are the TicketID, the ContactReason, and the AssetCategory - all three are
    text. One slide will show the top five Contact Reasons by Ticket Count, and the other will show the top five Categories by Ticket Count. The users will see this default view, but will be able to change it to see differently ranked items or can clear the
    ranking slicer altogether.
    What I've accomplished so far is to create the Calculated Field [Ticket Count] = COUNTA(Table1[TicketID])
    And 2 other calculated fields:
    [Contact Rank] = RANKX(ALL(Table1[ContactReason]),[Ticket Count],,,DENSE)
    [Asset Rank] = RANKX(ALL(Table1[AssetCategory]),[Ticket Count],,,DENSE)
    If I were creating a Pivot Table, this would be great. These fields calculate everything the right way. The problem is, I need to have a Rank slicer on each slide and the calculation by itself contains no data - with no data, there's nothing to slice. I
    realized I need to actually have columns of data so I can create a slicer. I need each row of the table to show the same [Contact Rank] for every instance of a particular ContactReason (and the same for the [Asset Rank] and AssetCategory).
    The RANKX formulas pasted into the Calculated Column section only show a value of 1 - with no Pivot table summarizing the fields, it's counting each row's ticket once, giving every line the tied Rank of #1.
    I've solved the problem in Excel by creating 2 Pivot Tables on a separate sheet that have the data field and the calculated field for ContactRason and AssetCategory. Then on my Excel Data Table, I've added two columns that do a VLOOKUP and pull over a the
    Calculated Rank from each Pivot Table that match the ContactReason and AssetCategory fields. This works on the flat Excel Data Table now, but will not be a solutions when we start pulling the data from the cube (and there is no flat table).
    What I think I need is an Expression for the RANKX formula that can give me, for each row, the count of all of the times a ContactReason shows up in an entire column. There's only about 100,000 lines of data and each ContactReason or AssetCategory
    may show up several thousand times. But if I can get the expression to return that count, then the RANKX formula should work in the Column. If it wasn't a DAX formula, I'd use a COUNTIF and say 'Count the entire ContactReason column anytime it's equal to the
    ContactReason on THIS row', but in DAX I don't know how to reference a single value in a row. I've tried the CALCULATE() formula, but it seems like the filter needs a specific value, and doesn't work on a dynamic "cell" value.
    Any help would be greatly appreciated! (I hope it all makes sense!)

    If I've understood you correctly then the ALLEXCEPT function may be what you're after and it could be applied in a similar way to the following...
    =
    RANKX(
    ALL(Table1),
    CALCULATE(
    COUNTROWS(table1),
    ALLEXCEPT(Table1, Table1[ContactReason])
    DENSE
    If this has missed the mark, would it be possible to clarify the requirement further?
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Is there any way to pass value from one SWF to another ?

    I am doing project using flash, now I cant pass a value from one SWF to another, is there any way to pass value from one SWF to another.
    thanks

    Hi,
    Just to confirm here do you simply want to communicate between two SWFs without involving Flash Media Server. If this is the case one good way of doing it is to use a local connection. It can be used for direct communication between two separate instances of the flash player. However if you want to involve multiple clients sharing a common variable then you may have to use Shared Object for this. Please let me know what is the actual use case, is it multiple clients sharing a common variable or different player instances communicating between themselves.
    Thanks,
    Abhishek

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • Is there any way to pass in JVM tunable params to OC4J containers?Ex: -Xmx256 ...

    Is there any way to pass in JVM tunable params to OC4J containers?
    1. Switch to -server rather than -classic
    2. Min/Max Memory configuration
    3. pass in tunable GC params
    Passing parameters to the JVM when executing dcmctl does not pass these variables to the exec-ed java process(OC4J Containers).
    Any help is appreciated.
    Thanks,
    Vamsi Nukala

    Hello
    say I like to pass object I created in one page say :
    MyObject obj = new MyObject("1","2","3");
    via http params (supmit or post ) to other page . and
    use it there can it be done ?No. You can however place them as attributes in scope (application/session/request) and retrieve these attributes in the next page.
    example
    in one page,
    session.setAttribute("obj", obj);
    in another page
    MyObject obj = (MyObject)session.getAttribute("obj");
    ram.

  • Is there any way to pass a webapp item ID number to the input form of another webapp?

    Context:
    I'm working with a group of members who are collaborating on research.  The idea is for one person to post information, and then have others build on it, including attaching files, images and hyperlinks (so a simple forum doesn't work...).
    If I could have the item ID from the main webapp be passed to the "child" webapp, all would be well.  I tried {tag_itemid} but of course, this didn't work.  I can display the item ID and have the users retype it into a form, but this isn't very streamlined...   Is there any way to pass the information directly to the form?
    Thanks!!
    Linda

    Simply make the child web app form part of one of the main web app's layout(s)/template. That way, when you use {tag_itemid}, it will be that of the main web app.

  • Is there any way of undoing a shuffle? The CDs I downloaded to iTunes have all been shuffled. As most of these are classical, it is inappropriate to have them separated into songs that play any old time. Can I restore them to the original albums?

    Is there any way of undoing a shuffle? The CDs I downloaded to iTunes have all been shuffled into individual 'songs'. As most of these are classical and folk, it is inappropriate to have them separated into songs that play any old time (ie, a movement from Beethoven's 5th symphony followed by a folk song followed by one excerpt from Vivaldi's Four Seasons, etc. Can I restore them all to the original albums and make sure the shuffle doesn't happen again?
    Thanks!

    goldberry wrote:
    Thanks! That has worked, but only partially - there are still some Beethovens mixed in with the Vivaldis. I'm sure I installed these as total albums.
    I have noticed that too from time to time, I generally move the files into the correct folder and fix the index in itunes when one won't open, occasionally.

  • My itunes account was disabled for some reason.  I changed password in iforgot and still didn't work.  I could log in but not make purchases from the store so I set up a new login/account .  Is there any way to move my music to the new account?

    My itunes account was disabled for some reason.  I changed password in iforgot and still didn't work.  I could log in and see my music but not make purchases from the store or even redeem an itunes gift card so I set up a new login/account with another email account of mine. On the new account I can redeem my gift card and download items onto my ipad2.  Is there any way to move my music to the new account?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • I sent in my iPod nano to the replacement program about two weeks back. However, I checked the status of the repair and it still says it has not been received yet. Is there any way to follow up on where the nano could be? I sent it via FedEx.

    I sent in my iPod nano to the replacement program about two weeks back. However, I checked the status of the repair and it still says it has not been received yet. However, my boyfriend sent in his the same time I did and his repair status says repair being diagnosed. I still have the "receipt" of the package when they first sent it to me. I sent it via FedEx. Is there any way to follow up on where the nano could be or maybe find out if I can still get a replacement even though my nano might be lost in transit?

    I sent it via FedEx. 
    Call FedEx.  They will be able to track their own packages.  They will let you know if your iPod Nano was delivered and to who!

  • The CC control panel use to show my 4 applications CC, CS6, LR5 and Bridge, now LR5 is no longer showing up. I pay for the photographer bundle, which includes LR5 and CC, why has it been dropped off? Is there any way to bring it back in the panel, because

    The CC control panel use to show my 4 applications CC, CS6, LR5 and Bridge, now LR5 is no longer showing up. I pay for the photographer bundle, which includes LR5 and CC, why has it been dropped off? Is there any way to bring it back in the panel, because in the listed applications which can be added below it is not listed.  Thanks!

    If you're a paying Creative Cloud member, you may not see Lightroom in the Creative Cloud if your computer doesn't meet the minimum system requirements. Check to make sure that your system meets the minimum requirements for the latest release of Lightroom.
    If you're using a trial version of Creative Cloud, the Lightroom trial is not available through Creative Cloud. It is, however, available as a stand-alone trial. See Install Lightroom trial | Creative Cloud membership. 
    Please refer to : Lightroom and Creative Cloud FAQ
    Regards
    Rajshree

  • Is there any way to get my reminders (from the new iPhone app) to sync with something on my laptop (Mail, iCal, some other desktop app)?

    Is there any way to get my reminders (from the new iPhone app) to sync with something on my laptop (Mail, iCal, some other desktop app)?

    Yes, if you have iCloud set up on your phone and computer, then reminders will be synced through iCal.

  • Is there any way to buy tv shows from the uk iTunes when I live in Ireland?

    is there any way to buy tv shows from the uk iTunes when I live in Ireland?

    And according to iTunes / Help...
    The iTunes Store may not be available in all countries or regions, and iTunes Store content may vary by country or region.

  • I have an Iphone 4, I have music files that appear on my phone that I want to delete, when I link it to my computer the songs on the phone will not appear in Itunes so I can delete them, Is there any way to delete these song off the phone without going th

    I have an Iphone 4, I have music files that appear on my phone that I want to delete, when I link it to my computer the songs on the phone will not appear in Itunes so I can delete them, Is there any way to delete these song off the phone without going through Itunes?

    Nope, it either needs to be plugged in or turned on with the power button.
    A replacement iPhone 4 is $149, but at least the whole phone is replaced.

  • Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    You should ask in InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • I need to transfer up to 200 pages and keynote files from my macbook to my PC. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as word-friendly?

    I need to transfer up to two hundred Pages and Keynote files from my macbook running on Mac OS X 10.6.8 to my PC running windows. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as a word-friendly file?

    I need to transfer up to two hundred Pages and Keynote files from my macbook running on Mac OS X 10.6.8 to my PC running windows. Is there any way I can convert all of the files to word-friendly documents as a batch change or will I have to open each individual file and re-save it as a word-friendly file?

Maybe you are looking for

  • Script to fetch in a folder and call FM EDI_DATA_INCOMMING

    Hi All, I am trying a inbound file to idoc scenario to post an idoc. The idoc files are presently placed in a folder in application server. When the script is run the idoc file should get picked from the folder in Application server and pass it to th

  • Some app have problem with sound

    Some app in es. Filmon dont work properly with sound

  • Smart View 'Free-Form' vs Excel Add-In

    The following Sample.Basic retrieve is valid in the Excel Add-In: Actual 100-10 Jan New York 1234 Connecticut 5678 It will retrieve in Smart View, but always converts immediately to this: Actual 100-10 Jan New York 1234 Connecticut 5678 Note that the

  • Homesharing not showing up

    I recently moved and set up my computer on my new network. Homesharing will not show shared libraries on any of my devices but one. I have a windows PC running windows 7. I have the most recent version of itunes. I have an iPhone5, an iPhone 4, an iP

  • Transfer Data

    i have 1 question import java.io.*; import java.net.*; public class Client {      public static void main (String args[]) {           Input in;           Output out;           Socket socket;           try {                socket = new Socket("localho