Display of the data without knowing the columns.

Hello

I want to display data AS that OF EMP TABLE USING plsql.

7499 "ALLEN SALESMAN" 7698 ' 20 / 02/1981 ' 1600, 300, 30

Without knowing the column emp TABLE I want to display data.i have tried, but does NOT...

DECLARE

CURSOR c1 IS SELECT * from all_tab_columns WHERE table_naMe = 'EMP ';

CURSOR c2 IS SELECT * FROM emp;

v_column_name varchar (200);

BEGIN

I'm IN c1 LOOP

FOR j IN LOOP c2

v_column_name: = 'j' | i.column_name;

dbms_output.put_line (v_column_name);

END LOOP;

END LOOP;

END;

Kind regards

John

Hi John,.

Maybe this can help you:

create or replace procedure prc_show_rows ( table_in varchar2 )
is
  CURSOR c1 IS SELECT * FROM all_tab_columns WHERE table_name = upper (table_in);
  type table_output is table of varchar2(32000);  -- this can be a problem with large rows
  work table_output;
  v_statement varchar2(2000);
BEGIN
  --
  v_statement := 'select ';
  --
  FOR j IN c1 LOOP
    v_statement := v_statement || j.column_name || ' || '' '' || ';  -- may be you need some more formatting with appropriate to_char clauses
  END LOOP;
  --
  v_statement := rtrim ( v_statement, ' |''') || ' from ' || table_in;
  --
  dbms_output.put_line ( v_statement ); -- not necessary, only for testing
  --
  execute immediate v_statement
     bulk collect INTO work;
  --
  for i in 1..work.COUNT loop
    dbms_output.put_line(work(i));
  end loop;
END;
/

exec prc_show_rows ( 'emp');
exec prc_show_rows ( 'dept');

concerning
Kay

Tags: Database

Similar Questions

  • We display only the columns required dynamically?

    Hi all

    I have a scenario where I have 30 columns in the rtf model. All columns will never be displayed, only a privileged few will be available for display. The output file is so see the empty columns. Now, I want to display only the columns that contain data.

    FYI - can't know what columns are made up of data until we run the report.

    Any advice.


    Thanks in advance.

    Malenfant.

    Hello

    You can use the following text:

    Column heading:
    My label

    The data in the column:
    My data

    The @column will tell XMLP wheater or not that column should be indicated.

    I hope this helps you.

    Kenneth BR

  • IR - code HTML display in the column PCT_GRAPH

    Database Oracle 11 g and oracle apex 4.2

    I created the form IR report. in the report of the IR, I have a column of type number percentage WHRATE name. I want to show the percentage displayed as bar in https://apex.mt-ag.com/pls/apex/f?p=145:8:0:NO:RP: & cs = 30A914467F826BB3DF61E79183C9F1007 last PCT_GRAPH in column mask.

    I have WHRATE interactive report column and I put number / date format = PCT_GRAPH:CFDEF0:144485:150.

    apply changes after when I run the report to the WHRATE column list below the code instead of the percentage of chart bar.

    < div style = "width: 150px;" height: 14px; background: #CFDEF0; border-top: 1px solid #aaaaaa; border-left: 1px solid #aaaaaa; border-bottom: 1px solid #ffffff; border-right: 1px solid #ffffff; "" > < img src="/i/1px_trans.gif" width = "30" alt = "30" height = "14" border = "0" style = "background: #144485;" "> < / div >

    kindly Guide.

    Thank you.

    870213 wrote:

    Please update your forum profile with a real handle instead of "870213.

    Database Oracle 11 g and oracle apex 4.2

    I created the form IR report. in the report of the IR, I have a column of type number percentage WHRATE name. I want to show the percentage displayed as bar in https://apex.mt-ag.com/pls/apex/f?p=145:8:0:NO:RP: & cs = 30A914467F826BB3DF61E79183C9F1007 last PCT_GRAPH in column mask.

    I have WHRATE interactive report column and I put number / date format = PCT_GRAPH:CFDEF0:144485:150.

    apply changes after when I run the report to the WHRATE column list below the code instead of the percentage of chart bar.

    30

    The value of the column percentage display as value attribute Standard report column.

  • Image will not be displayed in the column DataGrid on Mac

    Hi all

    I use the converter to display of image element in one of the columns of the datagrid control. The problem is, when I'm providing the full as - path "/ User/Images/icon.png", image is not rendered. However, when I put this image in the "src/assets" folder and path to as - "assets/icon.png", image is displayed.

    Could someone please suggest what goes wrong?

    Here is the snippet of code to component converter

    Beginning

    " < = xmlns:mx mx:Image ' http://www.Adobe.com/2006/MXML "

    width = "250".

    height = "40".

    source = "{data.". Icon} ".

    verticalAlign = "middle".

    horizontalAlign = "left".

    scaleContent = "false".

    maintainAspectRatio = "true" / >

    End

    When data. Icon is "/ User/Images/icon.png": not displayed.

    When data. Icon is "assets/icon.png": display.

    I guess I need to provide the relative path.


    Thank you

    D.A.

    Try adding file:// to the front of your path: file:///User/Images/icon.png

  • Interactive report, conditional display of the column binding

    Hello

    We have obligation to disable editing in case this field is 1 (1 = closed).

    Is it possible to disable it on interactive report.

    -case when status = 1 link in the column should be disabled (not visible) in order to prevent future changes on the payroll.

    SELECT payroll_no, status

    OF hr_payroll

    ORDER BY payroll_no DESC;

    I tried the link below, but it does not work in my case.

    http://nerd.NET.au/24-Apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-...

    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    Request Express 4.2.2.00.11


    Thank you in advance,

    Best regards, FM

    Status of the INCIDENT WHEN 'ACTIVE' = then


    '
    OTHER END null deactivate_employee.

    Of

    EMPLOYEES

    What exactly is the error you get? What HTML is displayed in the HTML source code?

    Just by looking at it, I would say that you need to remove the "/" before the f? p

    Don't forget not this way could cause problems if you start using the checksum, then you might want to look at the use of APEX_UTIL. PREPARE_URL to create your URL.

  • First group title below displays under the column headers using the model 23 classic report with the help of repeat titles on break

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.


    When I look at firebug code I saw that all the tables but the first, the break line is included in the last line of the previous table, so I can see how it did not work for the holidays since.

    I have tow questions.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Example of a question can be seen at apex.oracle.com at home

    Thank you

    Brad

    Roadling wrote:

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    The Standard report template definition in issue 23 contains thead and tbody elements:

    Before the column header

    
    

    Column title template

    #COLUMN_HEADER#
    

    After the title column

    
    
    

    After the lines

    
    
    
    
    
    
    #PAGINATION#
    
    
    
    

    This is intentional, the best practice for marking up HTML tables. What is not expected is the problem that arises when this model is used with the break of repeat titles on break formatting option. The repeated headings result table consisting of soup of tags containing several poorly constructed tbody and thead, which is not valid elements.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Create a copy of the report model Standard in Standard (break formatting) for use with reports of the break, remove the thead and tbody definitions of template tags and the breakdown of the reports to use the new model of change. (Or, if you use mainly break reports using the Standard template, keep the tags in the copy and remove them from the original in order to minimize the number of reports, you need to change.)

    Personally, I would create a report model of line custom to break complex reports in order to be able to have complete control over the structure and presentation.

  • Display all THE columns in the session state for a collection V4.0

    I loaded columns into a collection of APEX c001 to c020. as follows
    I'm in 1.:P1_SPC_NO_OF_SPECIMENS LOOP
    htmldb_collection.add_member (p_collection_name = > 'SPECIMEN_BATCH',)
    p_C001 = >: P1_LEVEL,.
    p_C002 = >: P1_PARENT_ID,.
    p_C003 = >: P1_SPC_TYPE,.
    p_C004 = >: P1_SPC_BANK_ASSIGNED,.
    p_C005 = >: P1_SPC_TRIAL,.
    p_C006 = >: P1_SPC_CONCENTRATION,.
    p_C007 = >: P1_SPC_SERUM_TAKEN_DATETIME,.
    p_C008 = >: P1_SPC_SERUM_FROZEN_DATETIME,.
    p_C009 = >: P1_SPC_CELL_COUNT,.
    p_C010 = > case: P1_SPC_CELL_COUNT_UNIT when '?' then "else: P1_SPC_CELL_COUNT_UNIT end.
    p_C011 = >: P1_SPC_VIABILITY_STATUS,.
    p_C012 = >: P1_SPC_VIABILITY_REASON,.
    p_C013 = >: P1_SPC_INITIAL_QUANTITY,.
    p_C014 = > case: P1_SPC_QUANTITY_UNIT when '?' then "else: P1_SPC_QUANTITY_UNIT end.
    p_C015 = >: P1_SPC_COMMENTS,.
    p_C016 = >: P12_SPC_VOL_OF_SAMPLE,.
    p_C017 = >: P12_SPC_DILUTION_FACTOR,.
    p_C018 = >: P12_SPC_A260,.
    p_C019 = >: P12_SPC_A280,.
    p_C020 = >: P12_SPC_RIN);
    END LOOP;

    When I discovered the contents of the collection in session state, I don't see until c010. How can I view all the columns 'C' of a collection in session state? I know that the values are in the columns to c020 c011 as I can successfully insert 20 values into a table!

    Thanks in advance
    Paul P

    Hello

    Better create report own region for debugging.

    SELECT *
    FROM apex_collections
    WHERE collection_name = 'SPECIMEN_BATCH'
    

    You can set the status of report never when you need, or just delete the entire region.

    Kind regards
    Jari

  • Use the Quick Date year section in the column header

    Version 11.1.1.7

    I have a dashboard command prompt which invites for a date.

    My analysis is filtered on this prompt.

    My data looks like this:

    Accounting_Date FY1_Data FY2_Data FY3_Data

    31 AUGUST 2014 200 300 400

    AUGUST 31, 2013 275 325 450

    My requirement is to display the exercise as the heading of column (as opposed to FY1_Data, FY2_Data, FY3_Data).

    FY1_Data is the year of the accounting Date - 2.

    FY2_Data is the year of the Date of accounting order - 1

    FY3_Data is the year of the accounting Date

    So, for the first record in my table example, the column headers must be (2012, FY2013, FY2014)

    For the second disc, the column headers must be (fiscal year 2011, 2012, FY2013).

    To do this, I have tried the following to the first column only:

    I put the column header to FY@{Year1}

    Then I put my dashboard accounting cut-off Date prompt to fill a variable presentation (ActPrdDt).

    Then I created another guest of 'Variable' dashboard with a year1 variable name.

    In this prompt, I used SQL results as the default selection:

    Select 'Date_Table '. "' Accounting_Date ' from 'MySubjectArea' where 'Date_Table '. "" Accounting_Date "= @{ActPrdDt}

    The problem is that the full date is displayed in the column header (AFA 08/31/2014).

    I tried to modify the sql statement in my second guest of dashboard for

    Select TO_CHAR ("Date_Table". "Accounting_Date", "YYYY")-2 of... "

    but the column header displays all values in the column, which is usually what it displays when there is an error in the sql statement.

    Is it possible to manipulate the sql statement to get only the year of the accounting Date and subtract 1 or 2 him?


    I changed the sql statement

    Of

    TO_CHAR ("Date_Table". "Accounting_Date", "YYYY")-2 "

    TO

    extract (year of "Date_Table". "Accounting_Date")-2 "

    This solved my problem.

  • the column 'from' on my mail has changed all the names being a sender

    I get messages from PayPal payment everytime someone pays me. The problem is on one of my email accounts that include all messages from PayPal for payments received from them. Everyone who sent me a payment last week all have the column with name changed to one name instead of that the message was in fact. The column now has only one customer name in it.

    For example:

    The original message in the column used to say "John doe via Pay Pal"... Now all the messages in the column now say 'jane doe via Pay Pal' when they said originally from john doe. All payments that have been received before and after this specific one payment now all read 'jane doe via Pay Pal' and NOT what they initially said in the column.

    I checked with my webmail provided and verified that the e-mail server and e-mail messages are properly formatted on the webmail with the sender correctly displayed in the column. It seems that the problem lies between the web and where it appears in Thunderbird.

    Help, please!

    Go to your address book and find the entrance to PayPal. Delete the name of this contact. It displays the name of the person where you first saved the contact. No doubt when you have selected to always display content from this sender.

  • Please let me know how I can add a new column with a constraint not null, table already has data, without falling off the table... Please help me on this issue...

    Hello

    I have an emp_job_det with a, b, c columns table. Note that this TABLE ALREADY has DATA OF THESE COLUMNS

    IAM now add a new column "D" with forced not null

    Fistly I alter the table by adding the single column "D", if I do, the entire column would be created with alll of nulls for the column DEFAULT D

    ALTER table emp_job_det Add number D; -do note not null CONSTRAINT is not added

    Second... If I try to add the constraint not null, get an eoor as already conatained null values...

    (GOLD)

    In other words, if I put the query

    ALTER table emp_job_det Add number D NOT NULL; -THROWS ERROR AS TABLE ALREADY CONTAINS DATA

    So my question is how how can I add a new column with a constraint not null, table already has the data, without falling off the table

    Please help me on this issue...

    Add the column without constraint, then fill the column. Once all the rows in the table are given in the new column, and then add the constraint not null.

  • Display the name of the tag as the column name and the value in the tag as a row of data from the input string.

    Hi Forum members,

    I am looking for a query display the name of the tag as the column name and the value in the tag as a row of data.

    I have to print the values within the tag to a file by choosing the value of the flags. the sequence of the tags will vary each time, as the tag name will change dynamically.

    So here is the example of input data and the expected output. The string in the text column must be separated as the column names and values.

    Input data
    Select 1 as seqno,' < > 0210A 50 4f < / 4f > < 5f20 > TEST CARD 16 < / 5f20 > < 5f2a > < / 5f2a > < 82 > 1 c 00 < / 82 > ' double text


    Output:

    Seqno 4f 5f20 5f2a 82
    0210A 50 16 1 00 TEST CARD 1

    Please help me by providing your entries on this.

    We use the version of Oracle 11.2.

    Note: This is not the XML string

    Thank you

    Shree

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    )

    Select d.seqno, x.*

    d the data,

    XMLTable ('/ root')

    by the way xmltransform (xmltype ('': replace (replace (text,'<><>'),)))

    XmlType (q'~http://www.w3.org/1999/XSL/Transform "version ="1.0"> ")

                                                     

                                                       

                                                         

                                                       

                                                     

                                                     

                                                       

                                                         

                                                       

                                                     

    ~'

    )

    )

    path of columns '4f' varchar2 (10) "tag4f."

    path of "5f20' varchar2 (30)"tag5f20. "

    path of '5f2a' varchar2 (10) "tag5f2a."

    path of varchar2 (10) "82" "tag82.

    ) x


    SEQNO 4f 5f20 5f2a 82
    1 0210A 50 16 TEST CARD - 1 00
    2 0210A 50 16 TEST CARD - 1 00
    3 0210A 50 16 TEST CARD - 1 00
    4 0210A 50 16 TEST CARD - 1 00

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    ),

    Chopper (seqno, Key, value, String) as

    (select seqno,

    regexp_substr (text,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (Text,'>(.*?))

    regexp_substr (text,'<.+?>. *? ) (.*) $', 1, 1, null, 1). » <>'

    from the data

    Union of all the

    Select seqno,

    regexp_substr (String,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (String,'>(.*?))

    regexp_substr (String,'<.+?>. *? ) (.*) $', 1, 1, null, 1)

    Chopper

    where regexp_substr (string,'<(.*?)>', 1, 1, null, 1) is not null

    )

    Select '4f', seqno, '5f2a', '82', '5f20.

    of (seqno, lower (key) select key, value)

    Chopper

    )

    Pivot (max (value) for key in ('4f' as '4f', '5f20' as '5f20', '5f2a' as '5f2a', "82" as "82"))

    Concerning

    Etbin

  • display the data in the column as column name

    in this column of query names are hard coded, I need to display the column name dynamically (based on sysdate). Please help me on this?

    with test_emp as

    (select 100 empno, 1st February 2014 ' hiredate, SAL union 1000 double all the)

    Select 200 empno, February 3, 2014 ", 2000 union SAL double all the"

    Select empno 300, 4 February 2014 ", 3000 union SAL double all the"

    Select 400 empno, 5 February 2014 ", 4000 SAL double

    )

    -Select * from test_emp

    SELECT EmpNo,

    Sum (decode (HireDate, trunc (sysdate), SAL, 0)) as '4 February 2014. "

    Sum (decode (HireDate, SAL, trunc(sysdate-1), 0)) as "February 3, 2014.

    Sum (decode (HireDate, trunc (sysdate)-2, SAL, 0)) as 'February 2, 2014.

    Sum (decode (HireDate, trunc (sysdate)-3, SAL, 0)) as 'February 1st, 2014. "

    Sum (decode (HireDate, trunc (sysdate)-4, SAL, 0)) as 'January 31, 2014.

    OF test_emp

    Group by empno stopped by 1

    expected results:

    EMPNO February 4, 2014 3 February 2014 2 February 2014 February 1, 2014 January 31, 2014

    100                     0                    0                       0                   1000               0

    200                     0                   2000                    0                   0                   0

    300                 3000                    0                       0                   0                   0

    400                     0                       0                       0                 0                    0

    Hello..

    We cannot manage dynamic crossover into a sql. So what I did just create a function with refcursor and get results. It will work for your case only. Try the code below and let me know in case of any problems

    FUNCTION to CREATE or REPLACE dyn_row_colum

    RETURN SYS_REFCURSOR

    AS

    v_sqlstr VARCHAR2 (32767): = ' SELECT empno, SUM (DECODE (hiredate,'|)) '''|| Trunc (sysdate) | " ((' |', sal, 0))' | ' '||'"'|| TRUNC (SYSDATE) |' » ' || «, » ;

    v_rfcur SYS_REFCURSOR;

    BEGIN

    FOR j_rec IN (SELECT col_val FROM test_emp TRUNC(SYSDATE-ROWNUM))

    LOOP

    v_sqlstr: = v_sqlstr | » '||' SUM (DECODE (hiredate,'|)) '''|| j_rec.col_val | " ((' |', sal, 0))' | ' '||'"'|| j_rec.col_val |'"' | ',';"

    END LOOP;

    v_sqlstr: = RTRIM (v_sqlstr, ','). » '||' OF test_emp GROUP BY empno';

    V_rfcur OPEN FOR v_sqlstr;

    RETURN v_rfcur;

    EXCEPTION

    WHILE OTHERS THEN

    LIFT;

    END dyn_row_colum;

    VARIABLE v_cur REFCURSOR

    EXEC: v_cur: = dyn_row_colum;

    PRINT v_cur;

    SELECT dyn_row_colum FROM dual;

    Unit tests: -.

    ----------------

    Scott@ORCL > dyn_row_colum FUNCTION to CREATE or REPLACE

    2 SYS_REFCURSOR RETURN

    3 AS

    4 v_sqlstr VARCHAR2 (32767): = ' SELECT empno, SUM (DECODE (hiredate,'|)) '''|| Trunc (sysdate) | " ((' |', sal, 0))' | ' '||'"'|| TRUNC (SYSDATE) |' » ' || «, » ;

    5 v_rfcur SYS_REFCURSOR;

    6 BEGIN

    7 FOR j_rec IN (SELECT col_val FROM test_emp TRUNC(SYSDATE-ROWNUM))

    8 LOOP

    9 v_sqlstr: = v_sqlstr | » '||' SUM (DECODE (hiredate,'|)) '''|| j_rec.col_val | " ((' |', sal, 0))' | ' '||'"'|| j_rec.col_val |'"' | ',';"

    10 END OF LOOP;

    11 v_sqlstr: = RTRIM (v_sqlstr, ','). » '||' OF test_emp GROUP BY empno';

    12 v_rfcur OPEN FOR v_sqlstr;

    13 RETURN v_rfcur;

    14 EXCEPTION

    15 SO THAT OTHERS THEN

    16 RAISE;

    17 END dyn_row_colum;

    18.

    The function is created.

    Scott@ORCL > v_cur VARIABLE REFCURSOR

    Scott@ORCL > EXEC: v_cur: = dyn_row_colum;

    PL/SQL procedure successfully completed.

    Scott@ORCL > v_cur PRINT;

    EMPNO 5 FEBRUARY 14 FEBRUARY 4, 14 3 FEBRUARY 14 FEBRUARY 2 14 1 FEBRUARY 14

    ---------- ---------- ---------- ---------- ---------- ----------

    100          0          0          0          0       1000

    400       4000          0          0          0          0

    300          0       3000          0          0          0

    200          0          0       2000          0          0

    Scott@ORCL > dyn_row_colum SELECT FROM dual;

    DYN_ROW_COLUM

    --------------------

    CURSOR STATEMENT: 1

    CURSOR STATEMENT: 1

    EMPNO 5 FEBRUARY 14 FEBRUARY 4, 14 3 FEBRUARY 14 FEBRUARY 2 14 1 FEBRUARY 14

    ---------- ---------- ---------- ---------- ---------- ----------

    100          0          0          0          0       1000

    400       4000          0          0          0          0

    300          0       3000          0          0          0

    200          0          0       2000          0          0

  • Hi, Hello: I am trying to create a Web site and don't know what to do to display the content of my web browser to display full-screen itself without any empty space.

    Hi, Hello: I am trying to create a Web site and don't know what to do to display the content of my web browser to display full-screen itself without any empty space.

    If you are looking to exhaust the entire screen with content regardless of the size of the browser called sensitive sites and unfortunately that are not supported in Muse. However, you can have some content such as backgrounds, slideshows and videos be full width.

  • Display the data type of a column in the status bar

    Hi all

    n pl/sql developer, when I select a column in a table.

    If I clicked with the mouse on the column in the query results box, it shows me the type of data and the size of the column in the status bar

    Developer SQL does not by default,

    is there an option I can change to do the same task?

    Thank you

    No, you will need to open a popup DESC of the query to see the data types of the data returned.

  • My display suddenly developed the columns of white dashes and has been distorted in many places.

    My display suddenly developed the columns of white dashes and has been distorted in many places. Subsequently, do not display and the computer turns off to protect themselves. I opened it in safe mode, and the screen is fine. I suppose a software problem. I tried to download a driver for AMD Radeon HD 6570 GPU without result and tried a reset to an earlier date also with no luck. Does anyone have any suggestions?

    Hello

    You certainly know the graphics that, when you say Radeon?

    You normally get drivers Chipset/video/graphic of your computer/notebook or the graphics card, if you have installed a graphics card manufacturer's Web site.

    If he continues to play until after you have installed the latest drivers, next step is to swap the graphic card with a good if a desktop computer.

    This is the path, and the problem is somewhere along it:

    Monitor > cable > Port > that is either connected to a graphics card in a slot on the motherboard or integrated graphics hardware that is part of the motherboard.

    When a laptop; If under warranty, contact the manufacturer.

    If it is not under warranty, contact a repair shop, local.

    See you soon.

Maybe you are looking for