[SOLVED] libreoffice calc variable defining

Hi to everybody,
I need to define a variable/constant in Excel / libreoffice calc.
E.g.:
I need the universal gas constant R=8.1345
And I must use it in many formulas such as =A1*B2*8.3145*(C3-D4)
Now, does exist any way to store the constant in a variable and use it in the formulas in this way: =A1*B2*r*(C3-D4)
Saving my time !!!
Thank you
Last edited by nTia89 (2014-07-20 17:34:59)

ewaller wrote:
You can force an absolute reference to a cell as opposed to a relative reference by using a $ in front of the row or column.   If you put the value of R in a Cell, say A123, refer to that cell in your equations as $A$123.  When you copy formulae that contain that form and paste them elsewhere, references that use the $form are not updated based on the relative location to where the formula is pasted.  It would take the form:
A1*B2*$A$123*(C3-D4)
I understand what do you mean, but this is not what I need!

Similar Messages

  • [SOLVED] libreoffice-calc doesn't start up at all

    I run `libreoffice --calc` from the terminal, and it immediately opens and exits.  Nothing is output to the console at all.
    Running it with `sudo` makes no difference.
    Last edited by jiaweihli (2012-06-05 00:31:04)

    jiawei@arch ~ $ > pacman -Qs libreoffice*
    local/libreoffice-calc 3.5.4-1 (libreoffice)
    Spreadsheet application for LibreOffice.
    local/libreoffice-common 3.5.4-1 (libreoffice)
    common files for LibreOffice - a productivity suite that is compatible with other major office suites
    local/libreoffice-en-US 3.5.4-1
    English (US) language pack for LibreOffice
    local/libreoffice-gnome 3.5.4-1 (libreoffice)
    Plug-in for LibreOffice that enables integration into the Gnome and other gtk desktop environment.
    local/libreoffice-writer 3.5.4-1 (libreoffice)
    Word Processor Applicationfor LibreOffice.

  • [SOLVED] Libreoffice installs in Russian

    A default installation of Libreoffice (thru Pacman) install itself with Russian as interface language (or another cyrillic script language--I do not speak Rusisan and cannot tell).
    How can I convince Libreoffice to use English? I tried removing and reinstalling. Nothing changes. My LANG env variable is set to en_US.UTF-8.
    Thanks for the help
    Stefano
    Last edited by stefano (2011-10-19 21:08:03)

    I'm afraid I can't help you:
    [karol@black ~]$ pacman -S libreoffice
    :: There are 11 members in group libreoffice:
    :: Repository extra
    1) libreoffice-base 2) libreoffice-calc 3) libreoffice-common 4) libreoffice-draw
    5) libreoffice-gnome 6) libreoffice-impress 7) libreoffice-kde4 8) libreoffice-math
    9) libreoffice-sdk 10) libreoffice-sdk-doc 11) libreoffice-writer
    Enter a selection (default=all):
    resolving dependencies...
    :: There are 103 providers available for libreoffice-langpack:
    :: Repository extra
    1) libreoffice-af 2) libreoffice-ar 3) libreoffice-as 4) libreoffice-ast 5) libreoffice-be
    6) libreoffice-bg 7) libreoffice-bn 8) libreoffice-bo 9) libreoffice-br
    10) libreoffice-brx 11) libreoffice-bs 12) libreoffice-ca 13) libreoffice-ca-XV
    14) libreoffice-cs 15) libreoffice-cy 16) libreoffice-da 17) libreoffice-de
    18) libreoffice-dgo 19) libreoffice-dz 20) libreoffice-el 21) libreoffice-en-GB
    22) libreoffice-en-US 23) libreoffice-en-ZA 24) libreoffice-eo 25) libreoffice-es
    26) libreoffice-et 27) libreoffice-eu 28) libreoffice-fa 29) libreoffice-fi
    30) libreoffice-fr 31) libreoffice-ga 32) libreoffice-gl 33) libreoffice-gu
    34) libreoffice-he 35) libreoffice-hi 36) libreoffice-hr 37) libreoffice-hu
    38) libreoffice-id 39) libreoffice-is 40) libreoffice-it 41) libreoffice-ja
    42) libreoffice-ka 43) libreoffice-kk 44) libreoffice-km 45) libreoffice-kn
    46) libreoffice-ko 47) libreoffice-kok 48) libreoffice-ks 49) libreoffice-ku
    50) libreoffice-lo 51) libreoffice-lt 52) libreoffice-lv 53) libreoffice-mai
    54) libreoffice-mk 55) libreoffice-ml 56) libreoffice-mn 57) libreoffice-mni
    58) libreoffice-mr 59) libreoffice-my 60) libreoffice-nb 61) libreoffice-ne
    62) libreoffice-nl 63) libreoffice-nn 64) libreoffice-nso 65) libreoffice-oc
    66) libreoffice-om 67) libreoffice-or 68) libreoffice-pa-IN 69) libreoffice-pl
    70) libreoffice-pt 71) libreoffice-pt-BR 72) libreoffice-ro 73) libreoffice-ru
    74) libreoffice-rw 75) libreoffice-sa-IN 76) libreoffice-sat 77) libreoffice-sd
    78) libreoffice-sh 79) libreoffice-si 80) libreoffice-sk 81) libreoffice-sl
    82) libreoffice-sq 83) libreoffice-sr 84) libreoffice-ss 85) libreoffice-st
    86) libreoffice-sv 87) libreoffice-sw-TZ 88) libreoffice-ta 89) libreoffice-te
    90) libreoffice-tg 91) libreoffice-th 92) libreoffice-tn 93) libreoffice-tr
    94) libreoffice-ts 95) libreoffice-ug 96) libreoffice-uk 97) libreoffice-uz
    98) libreoffice-ve 99) libreoffice-vi 100) libreoffice-xh 101) libreoffice-zh-CN
    102) libreoffice-zh-TW 103) libreoffice-zu
    Enter a number (default=1):

  • [Solved] Libreoffice segfaults on startup in libicule.so.51.2

    When I try to start Libreoffice, it just segfaults. The loading splash screen only flashes for a split second.
    Here are a few log entry examples:
    kernel: soffice.bin[10272]: segfault at 7f5ffc143820 ip 00007f600d3e2350 sp 00007fffb3735818 error 4 in libicule.so.51.2[7f600d3c0000+55000]
    systemd-coredump[10277]: Process 10272 (soffice.bin) dumped core.
    kernel: soffice.bin[10423]: segfault at 7f8564c6b820 ip 00007f85773ba350 sp 00007fff00b4b428 error 4 in libicule.so.51.2[7f8577398000+55000]
    systemd-coredump[10427]: Process 10423 (soffice.bin) dumped core.
    kernel: soffice.bin[10845]: segfault at 7f1e63923820 ip 00007f1e7a082350 sp 00007fff750d60e8 error 4 in libicule.so.51.2[7f1e7a060000+55000]
    systemd-coredump[10849]: Process 10845 (soffice.bin) dumped core.
    Research only led me to some Arch bug reports with the same problem [1] [2], but they are all marked as fixed.
    And I'm running the versions that are the most recent as of this post:
    local/libreoffice-calc 4.0.4-1 (libreoffice)
    Spreadsheet application for LibreOffice.
    local/libreoffice-common 4.0.4-1 (libreoffice)
    common files for LibreOffice - a productivity suite that is compatible with other major office suites
    local/libreoffice-de 4.0.4-1
    German language pack for LibreOffice
    local/libreoffice-impress 4.0.4-1 (libreoffice)
    Presentation Application for LibreOffice.
    local/libreoffice-writer 4.0.4-1 (libreoffice)
    Word Processor Application for LibreOffice.
    local/icu 51.2-1
    International Components for Unicode library
    local/fontconfig 2.10.93-1
    A library for configuring and customizing font access
    local/cairo 1.12.14-4
    Cairo vector graphics library
    local/freetype2 2.5.0.1-1
    TrueType font rendering library
    When I run libreoffice --backtrace, it starts up without segfaulting. But all text except in the work area is missing. Here are some screenshots: [1] [2]
    Here is the gdbtrace.log:
    warning: Currently logging to gdbtrace.log. Turn the logging off and on to make the new setting effective.
    warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    [New Thread 0x7fffe8145700 (LWP 11781)]
    [New Thread 0x7fffe030c700 (LWP 11782)]
    [New Thread 0x7fffdfb0b700 (LWP 11783)]
    [New Thread 0x7fffdd126700 (LWP 11784)]
    [New Thread 0x7fffcffff700 (LWP 11787)]
    [Thread 0x7fffcffff700 (LWP 11787) exited]
    [Thread 0x7fffe030c700 (LWP 11782) exited]
    [New Thread 0x7fffe030c700 (LWP 11964)]
    [New Thread 0x7fffcffff700 (LWP 11965)]
    [Thread 0x7fffcffff700 (LWP 11965) exited]
    [Thread 0x7fffe030c700 (LWP 11964) exited]
    [New Thread 0x7fffe030c700 (LWP 12045)]
    [Thread 0x7fffdd126700 (LWP 11784) exited]
    [Thread 0x7fffe030c700 (LWP 12045) exited]
    [New Thread 0x7fffe030c700 (LWP 12046)]
    [Thread 0x7fffe030c700 (LWP 12046) exited]
    [Thread 0x7fffdfb0b700 (LWP 11783) exited]
    [Thread 0x7fffe8145700 (LWP 11781) exited]
    [Inferior 1 (process 11777) exited normally]
    /usr/lib/libreoffice/program/gdbtrace:9: Error in sourced command file:
    No stack.
    quit
    This is a new install, libreoffice was segfaulting from the moment I installed it, so I'm unable to check if a package update caused this. I have another install on which Libreoffice works fine.
    I already tried reinstalling all the packages mentioned above and switching to infinality-bundle and back to vanilla again.
    /Edit: Marking as solved.
    Last edited by Malstrond (2013-07-01 16:17:23)

    Update: Solved it myself. The cause of this problem is the AUR package ttf-ms-win8, specifically the fonts /usr/share/fonts/TTF/segoeui*.ttf.

  • How to get the value of a variable defined in javascript in JSP

    how to get the value of a variable defined in javascript in/through JSP????

    In Javascript you can use the DOM to access the input element and set it's value before submitting the form. Then it's value will just be passed.

  • Report cannot access pl/sql table variable defined in Package Spec.

    Hi,
    I've created a package spec called pkg_report with a PL/SQL table variable defined called body_text_table. When I tried to compile the following code under the Before Report trigger:
    :desc := pkg_report.body_text_table(1);
    Oracle gave me the following error:
    Implementation Restriction: 'PKG_REPORT.BODY_TEXT_TABLE': Cannot directly access remote package variable or cursor.
    Does anyone have any idea about this error? Thank you for your time at looking at it.
    Regards,
    John

    You cannot directly access the package variable in a database package. The work around is to create a set_variable and get_variable wrapper function in the package body. See Metalink note 105838.1 for more info.
    A simple example:
    create or replace package my_package as
      my_var     number;
      function   get_variable return number ;
      procedure  set_variable (p_value in number) ;
    end ;
    create or replace package body my_package as
      function get_variable return number is
      begin
        return my_var;
      end ;
      procedure set_variable(p_value in number) is
      begin
        my_var := p_value ;
      end ;
    end;

  • [Solved] Libreoffice 3.6.1.4 don't start

    Hello,
    please excuse my bad english.
    I have a problem. Since the libreoffice update from 3.5.6 to 3.6.1.4 libreoffice don't start. For a short time i see the splash-screen and that's it. In the terminal, when i type soffice or lowriter or libreoffice --writer i can't see any message. Also i deleted the ~/.config/libreoffice folder. But that doesn't help. These packages are installed: libreoffice-common libreoffice-gnome libreoffice-de libreoffice-writer libreoffice-calc. When i downgrade to 3.5.6 everything is fine.
    I have a laptop with openbox and a desktop-pc with gnome. Same problem on both systems.
    Do you have any tip for me?
    Thanks Michael
    Last edited by Süerländer (2012-09-13 07:01:16)

    Experiencing the same problem here though I found out that the reason for LibreOffice to crash/segfault is the existence of a aquabase-language-support.ttf file which as far as I remember was perfectly accepted in previous versions.
    Once I remove it from my .fonts folder LibreOffice loads as it should (no deep testing performed though).
    Therefore, in case you are using a .fonts folder on my behalf I would suggest to check out its content (back it up and empty the folder and add the fonts again one by one checking each time if LibreOffice crashes or not until you find which of them may be the reason for the crash).

  • Variables defined in Query designer not affecting the web template

    Hello,
    I have some variables defined in a query, through Bex query  designer.
    The selection screen to enter the values for the variables pops up when excuted on the web or in excel .
    But the variable selection screen does not pop up when i execute a web template where in i defined with the same query.
    Please suggest me why it is happening so..

    In WAD check in the General Properties whether you have unchecked the Force Variable Screen On Checkbox
    Other thing to check is whether you have personalized the selection screen??? After Executing the Report go to selection screen by clicking on the Variable Screen option. To the left side of each variable you can see the personalization icon. right click on that and select delete personalization.
    Hope this helps.

  • How to use global variable defined in planning area in FOX

    Hi guys
    I meet a situation that needs to use variables defined in planning area in FOX.How to code?
    My situation as follows:
    Two variables are defined in planning area,one is zcomp_code,the other is zfiscyear.
    There are two key figures in the planning area,one is sales volume,the other is delta(%).
    I want to use sales volume multiplied by delta(%) in selected zcomp_code and zfiscyear by users.
    Anyone can help?
    Thanks in advance.

    Hi Eric
    check this example
    in fox you shoud declare your data and after call your variable
    after this you could easily operate on data using the f4 for definig the right fox operators
    DATA FYEAR TYPE 0FISCYEAR.
    FYEAR = VARV(PLANYEAR).
    {0COPANETRV, FYEAR,CRA,020} =
    {0COPANETRV,FYEAR,CRA,020} *
    ({ 0CP_DELTAB,FYEAR,CRA,020} + 100 ) /100.
    {0CP_DELTAB,FYEAR,CRA,020} = 0.

  • Variables defined in JSP include files.

    hi..
    i was wondering how to access the variable defined in a JSP include file from the page where it is included.

    If you are thinking of scriptlets, then you would do it in the same manner that you would access variables local to your jsp. A word of caution - jsp pre-compilation may not work.
    A neater solution would be store it as an attribute in 'page' scope.
    cheers,
    ram.

  • [libreoffice calc ] Libreoffice calc crash when I try to format cells

    I use archlinux 32 bits, KDE 4.9.4
    I notice that libreoffice calc 3.6.4 crashes when I try to format cells,
    step to reproduce the bug :
    - launch libreoffice
    - select a cell
    - select the menu "format cells"
    - libreoffice calc will crash immediatly ( libreoffice quits with no error message on the console )
    Last edited by Potomac (2012-12-20 08:30:43)

    My libreoffice writer crashes when I try to enter to tools->options->languages
    Writer and Calc crash when I type on hebrew language.
    Arch64 multilib KDE
    dmesg
    [ 1610.906823] soffice.bin[2432]: segfault at 1 ip 00007f47015a76ee sp 00007fffa9642720 error 4 in libicule.so.50.1.1[7f4701594000+3f000]
    [ 1637.581080] soffice.bin[2489]: segfault at 0 ip 00007fd22d58c6ee sp 00007fff59a31580 error 4 in libicule.so.50.1.1[7fd22d579000+3f000]
    [ 1696.549430] soffice.bin[2548]: segfault at 0 ip 00007fc6fccc06ee sp 00007fffb103f430 error 4 in libicule.so.50.1.1[7fc6fccad000+3f000]
    [ 3695.132368] soffice.bin[3944]: segfault at 1 ip 00007fd595b216ee sp 00007fff59486940 error 4 in libicule.so.50.1.1[7fd595b0e000+3f000]
    [ 3776.020681] soffice.bin[4009]: segfault at 1 ip 00007f543774e6ee sp 00007ffff842e8a0 error 4 in libicule.so.50.1.1[7f543773b000+3f000]
    [ 3852.988578] soffice.bin[4096]: segfault at 0 ip 00007f231eb866ee sp 00007fff7b244c10 error 4 in libicule.so.50.1.1[7f231eb73000+3f000]
    Last edited by letster (2012-12-20 11:00:37)

  • [solved] LibreOffice spellchecker does not work, version 3.4.2

    It's kind of a stupid question, but I do not know how I can debug this. The spell checker exits immediately after "Tools/Spelling and Grammar…" though there are incorrect words, "AutoSpellCheck" also underlines nothing. I set language in the status bar to "English", "Russian", "Ukrainian" — none worked. I have "Russian Dictionaries 0.6" and "Ukrainian spelling dictionary and thesaurus 1.6.0" in "Tools/Extension Manager…" (no English dictionary, strange). I have these packages installed:
    $ pacman -Q | grep -E "libreoffice|hunspell|mythes|hyphen"
    hunspell 1.2.15-1
    hunspell-en 7.1-1
    hunspell-ru 0.99g5-4
    hunspell-uk 1.6.1-1
    hyphen 2.7.1-2
    hyphen-en 2.7.1-2
    hyphen-ru 0.1-2
    hyphen-uk 0.1-1
    libmythes 1.2.1-1
    libreoffice-calc 3.4.2-2
    libreoffice-common 3.4.2-2
    libreoffice-en-GB 3.4.2-1
    libreoffice-extension-ct2n 3.4.2-2
    libreoffice-extension-diagram 3.4.2-2
    libreoffice-extension-google-docs 3.4.2-2
    libreoffice-extension-hunart 3.4.2-2
    libreoffice-extension-nlpsolver 3.4.2-2
    libreoffice-extension-numbertext 3.4.2-2
    libreoffice-extension-oooblogger 3.4.2-2
    libreoffice-extension-pdfimport 3.4.2-2
    libreoffice-extension-presentation-minimizer 3.4.2-2
    libreoffice-extension-presenter-screen 3.4.2-2
    libreoffice-extension-report-builder 3.4.2-2
    libreoffice-extension-scripting-beanshell 3.4.2-2
    libreoffice-extension-scripting-javascript 3.4.2-2
    libreoffice-extension-scripting-python 3.4.2-2
    libreoffice-extension-typo 3.4.2-2
    libreoffice-extension-validator 3.4.2-2
    libreoffice-extension-watch-window 3.4.2-2
    libreoffice-extension-wiki-publisher 3.4.2-2
    libreoffice-gnome 3.4.2-2
    libreoffice-writer 3.4.2-2
    mythes-en 20060306-1
    mythes-ru 0.1-2
    mythes-uk 0.1-2
    I thought that I missed some package due to splitting, then I installed "libreoffice-extensions". I also tried to downgrade to "libreoffice-3.4.1-1" (non-split) (I have no older packages).
    Last edited by beroal (2011-08-20 18:34:32)

    Baryon wrote:The only way I could get spellchecking to work was by manually installing a dictionary extension from the OpenOffice extensions site
    Thanks for your reply, but this does not work either.
    I noticed that "Tools/Options/Language Settings/Writing Aids/Available Language Modules" is empty, i.e. libreoffice does not see hunspell.
    $ ls /usr/lib/libreoffice/basis3.4/program | grep -E "lnth|hyphen|spell"
    libhyphenlx.so
    liblnthlx.so
    libspelllx.so
    $ ls -d /usr/lib/*spell*
    /usr/lib/aspell        /usr/lib/libaspell.so.15      /usr/lib/libgtkspell.so        /usr/lib/libhunspell-1.2.so        /usr/lib/libpspell.so
    /usr/lib/aspell-0.60   /usr/lib/libaspell.so.15.1.5  /usr/lib/libgtkspell.so.0        /usr/lib/libhunspell-1.2.so.0      /usr/lib/libpspell.so.15
    /usr/lib/libaspell.so  /usr/lib/libgtkspell.a         /usr/lib/libgtkspell.so.0.0.0  /usr/lib/libhunspell-1.2.so.0.0.0  /usr/lib/libpspell.so.15.1.5
    $ pacman -Q libreoffice-common
    libreoffice-common 3.4.2-2
    $ pacman -Q libreoffice-writer
    libreoffice-writer 3.4.2-2
    $ pacman -Q hunspell
    hunspell 1.2.15-1
    I deleted ~/.config/.libreoffice .
    Last edited by beroal (2011-08-20 17:58:01)

  • How to read static variable defined java class from flex?

    This is a beginner question. If I use remoteClass to map a java class and a flex class, how can I access a static variable defined in java class from the flex code?
    Thanks!

    Static propeties are by default ignored in the blazeds for serialization. You can try using another global property in the java bean which maps to the value stored in the static property( Hopefully it should work)
    eg,
    public String instanceValue = ClassName.staticValue;
    Ref: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.ht ml

  • [SOLVED] libreoffice "loading document after login takes 30+ sec"

    I have an arch install running xfce and lxdm as my login manager I have installed libreoffice per wiki instructions and configured memory optimizations as follows:
    Under Memory:
      - Reduced the number of Undo steps 20 steps.
      - Under Graphics cache, I set Use for LibreOffice to 128 MB.
      - I Set Memory per object to 20MB.
      - I Checked LibreOffice Quickstarter.
    However, It still takes about 45 seconds to load any document, spreadsheet, or presentation after logging in. However when I load a second or third... document, spreadsheet, or presentation they load near instantly. Furthermore, if I open a terminal and type "libreoffice --writer /path/to/doc," I receive no errors or any verbose message. Has anyone encountered this? Any help would be greatly appreciated.
    Last edited by forshark (2013-01-16 01:21:48)

    Ok, I have solved libreoffice's unacceptable behavior on my machine by:
    appending "/etc/hosts" with the following:
    127.0.0.1 $HOSTNAME localhost $HOSTNAME.(none)
    with $HOSTNAME actually spelled out
    ex "127.0.0.1 archden localhost archden.(none)"
    With this miracle cure your libreoffice installation will fall within an acceptable standard of behavior.
    PS. praying libreoffice is far more glorious in this respect.

  • Query with variable defined date no idea how

    Hello to all,
    i have a problem with a query, in this query i need a variable date that can be entered in the SQL statement.
    If the CREATE TABLE and INTO Values are needed, they can be found here:
    Re: Need Help with complex query for productio database
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            sum(
                case
                  when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date
                end
               ) step_b_5,
            sum(
                case t2.wo_step
                  when 'C' then t2.next_step_date - t2.step_date
                end
               ) step_c,
            sum(
                case t2.wo_step
                  when 'K' then t2.next_step_date - t2.step_date
                end
               ) step_k,
            sum(
                case t2.wo_step
                  when 'E' then t2.next_step_date - t2.step_date
                end
               ) step_e,
            sum(
                case t2.wo_step
                  when 'F' then t2.next_step_date - t2.step_date
                end
               ) step_f,
            sum(
                case t2.wo_step
                  when 'S' then t2.next_step_date - t2.step_date
                end
               ) step_s,
            sum(
                case t2.wo_step
                  when 'R' then t2.next_step_date - t2.step_date
                end
               ) step_r
    ,          CASE
                   WHEN      t1.priority = '02'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 5
                   THEN     'FALSE'
                   WHEN      t1.priority = '05'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 8
                   THEN     'FALSE'
                   WHEN      t1.priority = '12'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 30
                   THEN     'FALSE'
                   ELSE     'TRUE'
              END AS "IN MPD"                                  
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.descriptionIn this query i want to replace sysdate with a variable date that i want to define one time, maybe in the first line of the SQL query or one of the Top lines.
    The reason for this is, i want my results to an specific date, well i can change da system time but i want to solve that in the query.
    Or if there is a way to get promted for this variable each time when the qury runs, that would also be fine.
    I tried already DEFINE BEGIN END, but i get only a bunch of errors. I thins i do a basic mistake.
    Thank You all.

    Hi,
    To create and set a bind variable in SQL*Plus, you can do this:
    VARIABLE  base_date_text   VARCHAR2 (20)
    EXEC     :base_date_text := '01-Mar-2013 00:00:00';:base_date_text can now be used anywhere in your query where a string is allowed. Unfortunately, you can't have DATE bind variables, so that means it's only useful in calls to TO_DATE.
    You could calll TO_DATE everywhere you are now calling SYSDATE, or you could do something like this:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE (:base_date_text, 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...This adds a column to t2 called base_date, which is a real DATE. Anywhere in the main query, you can reference t2.base_date instead of SYSDATE.
    If you want to be prompted to enter the value at run-time, then you can use SQL*Plus substitution variables, like this
    ACCEPT  base_date_text  "Please enter the date to use (DD-Mon-YYYY HH24:MI:SS format): "
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE ('&base_date_text', 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...Again, t2.base_date (a DATE) is now available anywhere in the main query.

Maybe you are looking for

  • Error while trying to change or save as  query in query designer

    Hi , When we are trying to change or do a save as to a query in the query designer,it is giving us an error stating"'An unexpected object variable or with block variable not set'error occured in wdbrlog 1 error(s) are logged". We have searched in SDN

  • Ichat user failed to respond

    hi, i've been trying to video chat with people using ichat for somet ime now, every time i try to do it though, it just says "user failed to respond". i am using an AIM screen name, and so is the person i am trying to chat with. both of us are using

  • PO Changes report

    hi plz check this and let me know............ For example : i created a purchase order in ME21N. Using the transaction ME22N i changed the PO qty for the item 10. i want to know other than CDHDR ,CDPOS ,CHANGEDOCUMENT_READ_HEADERS ,CHANGEDOCUMENT_REA

  • Loading data to DSO in BI 7.0

    Hi., How to load data to DSO in BI 7.0. Is Infosource mandatory if we want to load data to DSO. What about the 0RECORDMODE field for DSO. How to maintain the transformations. Please guide me in BI 7.0 process.

  • Suggestion on using the variable index used in prompting the user

    import java.util.*; public class CaseOne { // main(): application entry point public static void main(String[] args) { //define necessary data structures (Step 1) int count = 5; // number of elements to average double value; // handle input double to