SQL (Select) based on Excel data

Hi
I have accounts & their status in a Excel file (like below)
Account     status     
1111     1
22222     11
I have like 300 rows in excel file
(sometimes Account will have only 4digits, in that case I want to append '0' in the front)
(sometimes status will have only 1/2digits, in that case I want to append '00', if its one digit and '0' if its two digit)
I want to write a select statement based on those, for example (in this case)
SELECT * FROM SUPPLIER
WHERE (Account = '01111' AND Status = '001')
OR (Account = '22222' AND Status = '011')
How do I write the select for all 300 rows(in excel) at one time? I don't want to use(create) tables. And I am using Oracle version 9
Thanks

Hi,
I assume this question is just about how to format the numbers, not about directly reading the Ecel file.
To use different formats in different situations, all in the same column, use CASE to to choose the appropriate format, like this:
WITH     my_excel_table     AS
(     -- Begin test data
     SELECT     1 AS n     FROM dual     UNION ALL
     SELECT     22     FROM dual     UNION ALL
     SELECT     333     FROM dual     UNION ALL
     SELECT     4444     FROM dual     UNION ALL
     SELECT     55555     FROM dual     UNION ALL
     SELECT     666666     FROM dual     UNION ALL
     SELECT     7777777     FROM dual
)     -- End test data, cut here
SELECT     n
,     TO_CHAR     ( n
          , 'fm'     
            ||
            CASE
               WHEN     n < 1000     THEN '000'
               WHEN     n < 100000     THEN '00000'
                              ELSE '9999999999'
            END
          )     AS f
FROM     my_excel_table
ORDER BY     n;The code above produces:
         N F
         1 001
        22 022
       333 333
      4444 04444
     55555 55555
    666666 666666
   7777777 7777777As written, this assumes the numbers are all non-negative integers, but it can be modified.
Message was edited by:
Frank Kulash
Sorry if this confused you. I see now that it doesn't really answer your question.
You can use TO_CHAR separately on the two columns:
TO_CHAR (account, 'fm00000')
TO_CHAR (status, 'fm000')
or use LPAD, as Visu demonstrated.
Only use these things for display. In the WHERE-clause (and similar places), you can use leading zeros if you like, but do not use quotes, that is, just say "account = 1111" and "status = 1", or, if you prefer, "account = 01111" and/or "status = 001".

Similar Messages

  • Importing Data into Sql Server 2012 from Excel Data

    Hi,
    I got errors like this when i am doing import data into sql server from excel Data. Can you please help us?
    - Executing (Error)
    Messages
    Error 0xc020901c: Data Flow Task 1: There was an error with Source - demotable$.Outputs[Excel Source Output].Columns[Comment] on Source - demotable$.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one
    or more characters had no match in the target code page.".
     (SQL Server Import and Export Wizard)
    Error 0xc020902a: Data Flow Task 1: The "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]" failed because truncation occurred, and the truncation row disposition on "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]"
    specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
     (SQL Server Import and Export Wizard)
    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - demotable$ returned error code 0xC020902A.  The component returned a failure code when the pipeline engine called PrimeOutput().
    The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)

    Are you attempting to import into a newly made table or into an existing table? It looks like it's trying to insert data where it cannot be inserted (invalid column or lack of data size in your column).
    Try the following:
    1). In your excel sheet, highlight the whole sheet and make sure the cells are in 'text' form and try re-importing
    2). save the document as ms dos TEXT and import as a text document.
    3). double check your columns are correct for the data, for example if you have a column that has a string of 100 characters and your column is 'NvarChar(90)' - that might cause the error? Or just correct data type in your column
    3). If that doesn't work and you're inserting into a new table, try importing it as string first and writing a query to insert columns that should be float/integer or whatever. You may want to convert float texts to a 'bigint' first rather than string
    > float as that can cause problems if I remember correctly.

  • Selecting based on current date

    I wonder how I can set a value in a table based on the current date. I have viewed most of the posts and I found that it is straight forward to get current date. But my problem is to pass that current date for the comparison in my select statement. For example
    I can get date using the select statement but I don't know how to use it in the next select statement. See below
    select sysdate
    from dual;
    Like here,
    UPDATE PAYMENT (payment_date)
    SET (sysdate) /* this does not work */
    WHERE pid='8';
    So what do I need to do to set the payment_date field correctly? (for the reference my PAYMENT table is shown below for clarity)
    CREATE TABLE PAYMENT     
         (pid          VARCHAR(15)          NOT NULL,
         rid          VARCHAR(15)          NOT NULL,
         payment_date     DATE,               
         due_date     DATE,
    PRIMARY KEY(pid));
    I would very much appreciate your response. Thank you.
    Edited by: user10653046 on Nov 30, 2008 12:30 AM

    If I'm not mistaken, you are asking about the basic syntax of an UPDATE statement?
    You can find that in the SQL Language Reference. A link to the part where it talks about the UPDATE statement: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#SQLRF01708
    An example:
    SQL> CREATE TABLE PAYMENT
      2  (pid VARCHAR(15) NOT NULL,
      3  rid VARCHAR(15) NOT NULL,
      4  payment_date DATE,
      5  due_date DATE,
      6  PRIMARY KEY(pid));
    Tabel is aangemaakt.
    SQL> update payment
      2     set payment_date = sysdate
      3   where pid = '8'
      4  /
    0 rijen zijn bijgewerkt.Regards,
    Rob.

  • Beginner installing SQL Server 2014 for Excel Data Mining

    Hello, I'm a complete beginner with servers but Im desperately trying to gain access to the SQL server for use with the data mining addin for excel.
    Could someone please help. When I try to make a connection in Excel by choosing DATA MINING> <No Connection> New> it then asks me for a Server Name in the connect to Analysis Services box. How can I find out what my Sever name is please? I have
    tried all sorts of names that I have found such as SQLEXPRESS or localhost but nothing works. It also tells me to 'Ensure that the Server is running'. Another error message I receive: No connection can be
    made because 'the target machine actively refused it'.
    I would be really grateful for some troubleshooting tips.
    Thank you

    Hi Alberto,
    Thanks very much for getting back to me.
    Here are the results of the Analysis Services report:
    Microsoft SQL Server 2014 Setup Discovery Report
    Product
    Instance
    Instance ID
    Feature
    Language
    Edition
    Version
    Clustered
    Configured
    Microsoft SQL Server 2014
    SQLEXPRESS
    MSSQL12.SQLEXPRESS
    Database Engine Services
    1033
    Express Edition
    12.0.2000.8
    No
    Yes
    Microsoft SQL Server 2014
    SQLEXPRESS
    MSSQL12.SQLEXPRESS
    SQL Server Replication
    1033
    Express Edition
    12.0.2000.8
    No
    Yes
    I then ran the System Configuration Checker and these are the results:
    Passed: 9. Failed: 1.
    Edition WOW 64 Platform    Failed
    (I can't paste the images as my account has not been verified)
    Should I assume that I have installed the wrong version? I am running 64 Bit Windows 8.
    I just need the most basic version for personal data analysis in Excel with the Data Mining Add-in. 
    Thanks again

  • Script to change fill color based on excel data?

    Hi.  I'm curious if there is a way to change the fill color of, say a rectangle, in Illustrator based on data in an excel spreadsheet (csv or whatever).  For example: say the data in the excel cell is 1 and that corresponds to the rectangle in Illustrator having a yellow fill...  Now say I update the data in the cell to 2 and save.  I run the script and it makes the box red.  Is that even remotely possible?  Thanks.

    Hi, yes it's possible, I used VBA on Windows
    Assuming you have an Illustrator file with 1 square, and 2 swatches named "yellow" and "red"
    this is how I set up the excel file
    type the formula in cell F2 as shown, make your color updates on cell E2
    VBA code:
    Sub recolorSquare()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim rect As Illustrator.PathItem
        Dim whatColor As String
        whatColor = range("F2")
        Set idoc = iapp.ActiveDocument
        Set rect = idoc.PathItems(1)
        rect.FillColor = idoc.Swatches(whatColor).Color
        Set rect = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub

  • Text-Variables for 12 selection based on 1 Date Variable

    Hello.
    I have a report where the user is being prompt to enter a start date (YYYYMM) in a variable.  Based on that, my report have 12 selection using the variable + offset(1), + offset(2) .... + offset(11).
    For the label of my columns, I'd like to display the the YYYYMM value, what the best way to achieve that?  From what I see, I might have to create 11 variables that are equals to my original variable entered by the user with the use of offset and then create 12 text variables to get that information but I really hope I'm wrong...
    Thanks.
    Regards,
    John

    Ok, sounds a better way than defining 24 variables (12 text + 11 Replacement path).
    Since I only have one variable (Month Selection by user), however, I'm not sure how to deal with the Offset in ABAP so I can properly assign my ZMONTH02TEXT, ZMONTH03TEXT, ZMONTH04TEXT and so on.  Do you have any piece of code to share ?  (Sorry, I'm pretty new to ABAP and I've been searching this forum for example but can't really find what I'm interested in).
    Basically what I need to do is to assign the following:
    ZCALMONTH01TEXT = ZCALMONTH --> The actual month is no problem as it's a simple replacement path variable defined
    ZCALMONTH02TEXT = ZCALMONTH with offset of + 1
    ZCALMONTH03TEXT ...
    ZCALMONTH12TEXT = ZCALMONTH with offset of + 11
    So it's ZCALMONTH02TEXT to ZCALMONTH12TEXT that I'm not sure how to code in the user exit..
    Thanks.

  • How to divide the SQL resultset  based on the data as scenarios?

    Hi,
    I need to develop a query which needs to be divided into scenarios
    Ex:
    Scenario 1: If a product is sold in US and billed in UK
    Scenario 2: If a product is sold in UK and billed in US
    Scenario 3: If a product is sold and billed in US
    Scenario 4: If a product is sold and billed in UK
    Based on 1 SQL result how can I divide and provide users based on the scenarios?
    Ex: Result should display all the data saying this result set is under scenario 1 etc.,
    Please advice
    Thanks,
    user12048986

    Hi,
    You can use a CASE expression to categorize each row:
    CASE  sold_country || ' ' || billed_country
         WHEN  'US UK'     THEN  1
         WHEN  'UK US'     THEN  2
         WHEN  'US US'     THEN  3
         WHEN  'UK UK'     THEN  4
    END     AS scenario_numIf either sold_country or billed_country is anything except 'UK' or 'US', then the expression above returns NULL.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.

  • Script to change colors of Illustrator shapes based on excel data?

    Hi. My Problem: I have a list of names in excel and I would like each name to correspond to a given color. And I have the same number of shapes in Illustrator which I would like the color fill to match those names/colors from my excel file. Is this possible with an easy script?

    There is an Illustrator scripting forum… Hardly anyone in it but it does exist… It 'may' be possible without script… If not it 'should' be possible with script… Look at data sets first…

  • Automatically renaming pdf files based on excel data

    I am creating pdf certificates using variable data from excel files with InDesign.  This creates a multipage pdf file with a different persons name on each page.  Then end result needs to be individual pdf files named for each person.  I can extract the single pages out of the main pdf ending up with however many files all named the same thing besides a number at the end of the common file name.  Question:  Is there a automated process of renaming the individual files using the data from the excel file?

    You're looking for a PDF Parser or PDF miner tool (PDFminer) as a starting framework, and you'll almost certainly be writing custom code around that as parsing a text file that's effectively free-form and originating from multiple different sources almost always (always?) involves writing customized processing code and an on-going series of tweaks as the suppliers of the PDF change their ticket formats.  (Even apparently-simple details such as the time and date formats, for instance, can vary by geography and language and by supplier, and can derail common processing.)
    In some cases that I can envision, it'd be entirely possible that the data you're after is actually located in an embedded image and not in text that can be parsed.
    The best approach is to get folks to send you JSON or XML or some other format intended for interchange, and avoid the whole mess that is parsing or mining a printer-oriented format.
    The other obvious option is to use something like Amazon's Mechanical Turk or some other explicitly outsourced help.  Depending on how often the formats change and how many of these PDF files you're dealing with and how varied the formats are, sometimes throwing staff at the problem can be the most cost-effective approach.

  • What is a good way to check if sql select basd cursor return anything

    Hello everyone,
    I am trying to find a good way to identify that a SQL select based cursor return nothing.
    I know that or we use exception when no data found, or count(*) to check how many rows are returned.
    I have a cursor based on quite a long select statement.
    Like
    CREATE OR REPLACE PROCEDURE aaa (v_input IN NUMBER, v_output OUT VARCHAR2)
         CURSOR long_cursor IS
              --long select statement(with input variable) ;
    BEGIN
         Select count(*)
         Into v_count
      From
      -- a long select statment with input again ;
      IF v_count > 0 then
        For record in long_cursor loop
         --Get information from cursor
            --other processing for output
        End loop;
      END IF;
    END;Is there any other way than the above ?
    I would love to reduce the amount of typing. I know that repetition in code is not good.
    Thanks in advance,
    Ann
    Edited by: Ann586341 on Feb 28, 2013 2:29 PM

    >
    Not sure I understand your point. I am still a new bie here.
    >
    A flag is just a piece of data. By itself it doesn't prevent anyone from changing the data. And in a multiuser system anything you try to check is based on the COMMITTED data in the system. Two users can be changing two different rows at the same time but neither user will see the other change.
    So if you try to count how many rows meet a particular condition you may get a count of 8 but after the other user commits the count might be 7 or 9. So if you use 8 it may not be valid for very long.
    >
    But the app we use is Oracle Application Express 4.0.
    I assume when the data is read, there will be some kind of lock on these rows so other users cannot change it, right ?
    Or should I use SELECT for update even I do not update anything here.
    >
    I can't help you with that one. That would be a question for the application express forum.
    Oracle Application Express (APEX)
    You don't need to use FOR UPDATE if you don't plan to change the data. But, as explained above, you can't rely on any data you query being the same because another user could be changing it while you are looking at it.

  • Want to select query based on sample data.

    My Oracle Version
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    I am creating inventory valuation report using FIFO method . here sample data .
    create table tranx(
    TRXTYPE     varchar2(10) ,ITEM_CODE varchar2(10),     RATE number,qty number
    insert into tranx values('IN'     ,'14042014',     457.2     ,10);
    insert into tranx values('OUT','14042014',     0,          10);
    insert into tranx  values('IN','14042014',     458.1,     35);
    insert into  tranx values('OUT','14042014',     0,          11);
    insert into  tranx values('OUT','14042014',     0,          6);
    insert into  tranx values('IN','     14042014',     457.2     ,10);
    insert into tranx  values('OUT','     14042014',     0,          3);
    insert into tranx  values('OUT','     14042014',     0,          4);
    insert into tranx  values('IN','     14042014',     457.2,     20);
    insert into tranx  values('OUT','     14042014',     0,          5);
    insert into tranx  values('OUT','     14042014',     0,          9);
    insert into tranx  values('OUT','     14042014',     0,          8);
    current output
    TRXTYPE     ITEM_CODE     RATE      QTY
    IN     14042014     457.2     10
    OUT     14042014     0          10
    IN     14042014     458.1     35
    OUT     14042014     0          11
    OUT     14042014     0          6
    IN     14042014     457.2     10
    OUT     14042014     0          3
    OUT     14042014     0          4
    IN     14042014     457.2     20
    OUT     14042014     0          5
    OUT     14042014     0          9
    OUT     14042014     0          8above data populate based on first in first out . but out rate is not comes from that query. suppose fist 10 qty are OUT its rate same as IN. but when qty start out from 35 rate will be 458.1 till all 35 qty will not out. like out qty 11,6,3,4,5,9 now total are 38 .
    when qty 9 will out the rate are 6 qty rate 458.1 and other 3 out rate of 457.2 means total value of 9 out qty value is 4120.20 .
    Now 35 qty is completed and after that rate will continue with 457.2 till 10 qty not completed.
    I think you understand my detail if not please tell me .
    thanks
    i am waiting your reply.

    As SomeoneElse mentioned, there is no row order in relational tables, so you can't tell which row is first and which is next unless ORDER BY is used. So I added column SEQ to your table:
    SQL> select  *
      2    from  tranx
      3  /
    TRXTYPE    ITEM_CODE        RATE        QTY        SEQ
    IN         14042014        457.2         10          1
    OUT        14042014            0         10          2
    IN         14042014        458.1         35          3
    OUT        14042014            0         11          4
    OUT        14042014            0          6          5
    IN         14042014        457.2         10          6
    OUT        14042014            0          3          7
    OUT        14042014            0          4          8
    IN         14042014        457.2         20          9
    OUT        14042014            0          5         10
    OUT        14042014            0          9         11
    TRXTYPE    ITEM_CODE        RATE        QTY        SEQ
    OUT        14042014            0          8         12
    12 rows selected.
    SQL> Now it can be solved. Your task requires either hierarchical or recursive solution. Below is recursive solution using MODEL:
    with t as (
               select  tranx.*,
                       case trxtype
                         when 'IN' then row_number() over(partition by item_code,trxtype order by seq)
                         else 0
                       end rn_in,
                       case trxtype
                         when 'OUT' then row_number() over(partition by item_code,trxtype order by seq)
                         else 0
                       end rn_out,
                       count(case trxtype when 'OUT' then 1 end) over(partition by item_code) cnt_out
                 from  tranx
    select  trxtype,
            item_code,
            rate,
            qty
      from  t
      model
        partition by(item_code)
        dimension by(rn_in,rn_out)
        measures(trxtype,rate,qty,qty qty_remainder,cnt_out,1 current_in,seq)
        rules iterate(10) until(iteration_number + 1 = cnt_out[0,1])
         rate[0,iteration_number + 1]          = rate[current_in[1,0],0],
         qty_remainder[0,iteration_number + 1] = case sign(qty_remainder[0,cv() - 1])
                                                   when 1 then qty_remainder[0,cv() - 1] - qty[0,cv()]
                                                   else qty[current_in[1,0],0] - qty[0,cv()] + nvl(qty_remainder[0,cv() - 1],0)
                                                 end,
         current_in[1,0]                       = case sign(qty_remainder[0,iteration_number + 1])
                                                   when 1 then current_in[1,0]
                                                   else current_in[1,0] + 1
                                                 end
      order by seq
    TRXTYPE    ITEM_CODE        RATE        QTY
    IN         14042014        457.2         10
    OUT        14042014        457.2         10
    IN         14042014        458.1         35
    OUT        14042014        458.1         11
    OUT        14042014        458.1          6
    IN         14042014        457.2         10
    OUT        14042014        458.1          3
    OUT        14042014        458.1          4
    IN         14042014        457.2         20
    OUT        14042014        458.1          5
    OUT        14042014        458.1          9
    TRXTYPE    ITEM_CODE        RATE        QTY
    OUT        14042014        457.2          8
    12 rows selected.
    SQL> SY.

  • CrystalRpts - Excel Data source, SQLServer2005 table. SQL Query behavior?

    Greetings - What should be a simple report (with Excel 2007 spreadsheet as primary data source linking to a SQLServer 2005 table ) returns incorrect results.  Query designed to select data from SQL Table with  'DATES >=' certain date, but data returned ignores the DATE qualifier.
    Running DATE query manually against the SQL Table proves the data is correct. 
    Anyone notice problems with SQL Query behavior when mixing data sources?  Thanks.

    Hello,
    Take the SQL that works outside of CR and then create a new report and add all data sources. Now use a Command Object and paste in your SQL. YOu may have to play with adding each data source in a different order. If that works great if not you'll have to figure out a way to get all the data into one source.
    I believe MS SQL Server can link multiple data sources and types. Check SQL Help file for more info it it is possible.
    Thank you
    Don

  • Simple select to get data based on a date

    Hi all
    I have written some data to a table and am having issues trying to do a select and get that data based on the query.
    I want to filter on a column called: TIMESTAMP based on the condition that the data was written to the DB on the following date:
    01-OCT-09 10.47.35.597914000
    I thought this would be enough:
    select * from tableX
    where current_value = 999
    and TIMESTAMP = '01-Oct-2009'
    I know the 999 exists because if I take out the last line I get the data I want.
    A basic question I know but any help much appreciated.

    Dird wrote:
    Hi Boneist,
    When using &gt; or &lt; I use TO_DATE with DD-MON-YYYY or whatever format I need. TO_CHAR just comes to mind naturally when I need an equality test.
    MikeHmm....
    Let's see ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    Elapsed: 00:00:00.07
    satyaki>
    satyaki>
    satyaki>select *
      2     from emp
      3     where hiredate < to_date('01-MAR-1981','DD-MON-YYYY');
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select *
      2     from emp
      3     where to_char(hiredate,'DD-MON-YYYY') < {noformat}'{noformat}01-MAR-1981{noformat}'{noformat} ;
    no rows selected
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>So, as you can clearly see considering date as string may cost you heavy. Or don't you think so?
    Regards.
    Satyaki De.
    N.B.: Some problem with the formatting. So, date is not appearing in the second case. :(

  • Can I pass parameters from a dashboard via a dashboard prompt and presentation variable to publisher report based on a data model with select statements in OBIEE 11g ?

    I have a publisher 11g (v 11.1.1.7)  report with a single parameter. The report is based on a data model not a subject area.  I created a dashboard put a dashboard prompt and link to the report in separate section on the same page.  The dashboard prompt sets a presentation variable named the same as the parameter in the report. 
    The problem was when I created the dashboard prompt, it forced me to select a subject area which I did (though did not want to) and then I created both a column and variable prompts. But clicking on the
    report link completely ignored the value that I thought would be passed in the presentation variable to the report.
    Side note :  My report uses a pdf template for its layout where I have mapped the columns names from my data model to the form fields on the pdf form.  I noticed that if I create a publisher report based on a subject area, then I do not have the choice to choose a PDF as a template type for my layout.  (I only see BI Publisher Template as a choice). 
    I see some documentation online that suggest it could be done in 10g.
    Thanks
    M. Jamal

    Ok,
    I just tried that and it still doesn't pass anything to the prompt.
    I changed the prompt to an edit field and I made the following weblink but when i click the link from an account it doesn't put anything in the prompt and all data for all accounts is shown.
    This is the URL maybe I messed something up...
    https://secure-ausomx###.crmondemand.com/OnDemand/user/Dashboard?OMTHD=ShowDashboard&OMTGT=ReportIFrame&SelDashboardFrm.Dashboard Type=%2fshared%2fCompany_########_Shared_Folder%2f_portal%2f360+Report&Option=rfd&Action=Navigate&P0=1&P1=eq&P2=Account."Account Name"&P3=%%%Name%%%
    thanks

  • The same Excel DATE.VALUE function in SQL

    Hi, I need to convert a date in a number that Excel can recognize.
    I'm trying to do a
    SELECT
    (trunc(SYSDATE) - TO_DATE('1900-01-01', 'yyyy-mm-dd'))
    FROM dual
    And I retrieve this: 41014
    But today in excel is 41016!!
    Why? There is a better solution than this?
    Thank you, R.

    See this topic for an answer: Import Excel Date Field
    Basically you need to do this:
    SELECT (TRUNC(SYSDATE) - TO_DATE('01-JAN-1900', 'DD-MON-YYYY')) + 2
    FROM   dual

Maybe you are looking for