SQL Query to print from 1 to 100

Hi
Recently I was asked this question. How to print numbers from 1 to 100 using a select statement? No table is available. Also if a table is given with one column which contains a few random values between 1 and 100 how to print those values between 1 and 100 that do not exist in the table?
Regards
Venkat

scott@ORA92> select rownum from (select 1 from dual group by cube (1,2,3,4,5,6,7))
  2  where rownum <= 100
  3  /
    ROWNUM
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54
        55
        56
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
        75
        76
        77
        78
        79
        80
        81
        82
        83
        84
        85
        86
        87
        88
        89
        90
        91
        92
        93
        94
        95
        96
        97
        98
        99
       100
100 rows selected.
scott@ORA92> create table test_table
  2    (random_num number)
  3  /
Table created.
scott@ORA92> begin
  2    for i in 1 .. 40 loop
  3        insert into test_table values (abs (round (mod (dbms_random.random, 100))));
  4    end loop;
  5  end;
  6  /
PL/SQL procedure successfully completed.
scott@ORA92> select * from test_table
  2  /
RANDOM_NUM
        76
         1
        39
         5
         9
        24
        86
        78
        58
        43
        74
        49
        40
        43
        32
        61
        34
        50
         9
        66
        31
        32
        88
        33
        29
        25
        20
        55
        72
        73
        58
        85
        75
        21
        82
        77
        34
        86
        96
        24
40 rows selected.
scott@ORA92> select t1.rn as missing_numbers
  2  from   (select rownum as rn
  3            from   (select 1 from dual group by cube (1,2,3,4,5,6,7))
  4            where  rownum <= 100) t1
  5  where  not exists
  6           (select random_num
  7            from   test_table
  8            where  random_num = t1.rn)
  9  /
MISSING_NUMBERS
              2
              3
              4
              6
              7
              8
             10
             11
             12
             13
             14
             15
             16
             17
             18
             19
             22
             23
             26
             27
             28
             30
             35
             36
             37
             38
             41
             42
             44
             45
             46
             47
             48
             51
             52
             53
             54
             56
             57
             59
             60
             62
             63
             64
             65
             67
             68
             69
             70
             71
             79
             80
             81
             83
             84
             87
             89
             90
             91
             92
             93
             94
             95
             97
             98
             99
            100
67 rows selected.

Similar Messages

  • Reg: sql query that prints all sundays in the year

    Hi all,
    Please give me sql query that prints all sundays in year. And when ever we execute that query then that will prints the sysdate(that is execution date).
    Thanks in Advance,
    -prasad.
    Edited by: prasad_orcl on Jun 5, 2009 9:13 PM

    Hi,
    Plz try this and let me know this works or not...
    SELECT DATE DATES,TO_CHAR(DATE,'DAY') DAYS FROM FISCAL_CALENDAR
    WHERE DATE_YEAR = 2009 AND
    DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND
    ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12) -1 AND
    TRIM(TO_CHAR(DATE,'DAY')) = 'SUNDAY'
    ORDER BY DATE
    OUTPUT:
    DATES     DAYS
    1/4/2009     SUNDAY
    1/11/2009     SUNDAY
    1/18/2009     SUNDAY
    1/25/2009     SUNDAY
    2/1/2009     SUNDAY
    2/8/2009     SUNDAY
    2/15/2009     SUNDAY
    2/22/2009     SUNDAY
    3/1/2009     SUNDAY
    3/8/2009     SUNDAY
    3/15/2009     SUNDAY
    3/22/2009     SUNDAY
    3/29/2009     SUNDAY
    4/5/2009     SUNDAY
    4/12/2009     SUNDAY
    4/19/2009     SUNDAY
    4/26/2009     SUNDAY
    5/3/2009     SUNDAY
    5/10/2009     SUNDAY
    5/17/2009     SUNDAY
    5/24/2009     SUNDAY
    5/31/2009     SUNDAY
    6/7/2009     SUNDAY
    6/14/2009     SUNDAY
    6/21/2009     SUNDAY
    6/28/2009     SUNDAY
    7/5/2009     SUNDAY
    7/12/2009     SUNDAY
    7/19/2009     SUNDAY
    7/26/2009     SUNDAY
    8/2/2009     SUNDAY
    8/9/2009     SUNDAY
    8/16/2009     SUNDAY
    8/23/2009     SUNDAY
    8/30/2009     SUNDAY
    9/6/2009     SUNDAY
    9/13/2009     SUNDAY
    9/20/2009     SUNDAY
    9/27/2009     SUNDAY
    10/4/2009     SUNDAY
    10/11/2009SUNDAY
    10/18/2009SUNDAY
    10/25/2009SUNDAY
    11/1/2009     SUNDAY
    11/8/2009     SUNDAY
    11/15/2009SUNDAY
    11/22/2009SUNDAY
    11/29/2009SUNDAY
    12/6/2009     SUNDAY
    12/13/2009SUNDAY
    12/20/2009SUNDAY
    12/27/2009SUNDAY
    Regards
    Thiyag

  • What is sql query to print BOM hierarchy for a give item_number

    Hi,
    anyone is having sql query to print entire bom hiereachy for a given item number.
    Regards,
    ashok

    Try below query
    SELECT /* ORDERED FIRST_ROWS INDEX(MSI MTL_SYSTEM_ITEMS_U1)
    INDEX(BOM BOM_BILL_OF_MATERIALS_U2)
    INDEX(LU10 MFG_LOOKUPS_U1) INDEX(FCL FND_COMMON_LOOKUPS_U1) */
    rowidtochar(bet.rowid) row_id,
    bet.top_bill_sequence_id,
    bet.bill_sequence_id,
    bet.component_sequence_id,
    bet.component_item_id,
    bet.organization_id,
    bet.operation_seq_num,
    bet.plan_level,
    bet.extended_quantity,
    bet.item_num,
    bet.sort_order,
    bet.group_id,
    bet.item_cost,
    nvl(msi.reservable_type, 2) reservable_type,
    bet.extend_cost_flag,
    bet.top_alternate_designator,
    bet.top_item_id,
    bet.effectivity_date,
    bet.disable_date,
    bet.implementation_date,
    decode(bet.implementation_date, null, 2, 1) implemented_flag,
    bet.optional,
    bet.planning_factor,
    bet.component_yield_factor,
    bet.include_in_rollup_flag,
    bet.wip_supply_type wip_supply_type,
    ml2.meaning supply_type,
    bet.supply_subinventory,
    bet.supply_locator_id,
    bet.locator,
    bet.component_remarks,
    bet.change_notice,
    bet.component_quantity,
    bet.operation_lead_time_percent,
    bet.operation_offset,
    bet.mutually_exclusive_options,
    bet.check_atp,
    bet.required_to_ship,
    lu10.meaning so_basis,
    bet.required_for_revenue,
    bet.include_on_ship_docs,
    bet.low_quantity minimum_quantity,
    bet.high_quantity maximum_quantity,
    msi.primary_uom_code unit_of_measure,
    msi.item_type item_type,
    fcl.meaning item_type_description,
    msi.INVENTORY_ITEM_STATUS_CODE item_status,
    msi.description,
    msi.eng_item_flag,
    msi.cum_manufacturing_lead_time,
    msi.cumulative_total_lead_time,
    msi.full_lead_time manufacturing_lead_time,
    bom.assembly_item_id parent_item_id,
    bom.alternate_bom_designator parent_alternate,
    decode(bom.alternate_bom_designator, null, 2, 1) parent_alternate_flag,
    bom.assembly_type eng_bill,
    LPAD(bet.PLAN_LEVEL, LEAST(bet.PLAN_LEVEL, 8), '.') DISPLAY_PLAN_LEVEL,
    TO_CHAR(BET.EFFECTIVITY_DATE, 'HH24:MI') EFFECTIVITY_TIME,
    TO_CHAR(BET.DISABLE_DATE, 'HH24:MI') DISABLE_TIME,
    BET.EXTENDED_QUANTITY EXTENDED_QUANTITY6,          
    DECODE(BET.EXTEND_COST_FLAG, 1, BET.ITEM_COST * BET.EXTENDED_QUANTITY, 2, 0, NULL) EXTENDED_COST,
    BET.OPERATION_SEQ_NUM OPERATION_SEQ_NUM7,          
    MSI.BOM_ITEM_TYPE bom_item_type,
    MSI.REPLENISH_TO_ORDER_FLAG,
    MSI.PICK_COMPONENTS_FLAG,
    MSI.ATP_COMPONENTS_FLAG,
    MSI.ATP_FLAG,
    MSI.SHIPPABLE_ITEM_FLAG,
    MSI.MRP_PLANNING_CODE,
    MSI.SO_TRANSACTIONS_FLAG,
    MSI.CUSTOMER_ORDER_ENABLED_FLAG,
    MSI.INVOICE_ENABLED_FLAG,
    MSI.INVENTORY_ASSET_FLAG,
    MSI.SEGMENT1,
    MSI.SEGMENT1,
    BET.CURRENT_REVISION,
    MSI.GLOBAL_ATTRIBUTE6 ITEM_SPECIFICATION,
    BIC.ATTRIBUTE2 ITEM_SVC,
    BIC.ATTRIBUTE3 ITEM_SF,
    BIC.ATTRIBUTE10 ITEM_DPC,
    BIC.ATTRIBUTE12 RECV_DEPT_CD,
    BD.DEPARTMENT_CODE ROU_RECV_DEPARTMENT,
         msi.description ENG_DESC,
         msi.global_attribute6 ENG_SPEC,
         msi.primary_uom_code ENG_UOM,
         bet.component_quantity ENG_QTY,
         msi.item_type ENG_UIT,
         ml2.meaning ENG_SUPPLY_TYPE,
         bet.extend_cost_flag ENG_COST_FLAG,
    BIC.INCLUDE_IN_COST_ROLLUP INCLUDE_IN_COST_ROLLUP,
    msi.planning_make_buy_code,
    bet.Attribute13,
    bet.Attribute14,
    MSI.GLOBAL_ATTRIBUTE9,
    msi.segment9 AI_TYPE
    FROM MFG_LOOKUPS ML2,
    MFG_LOOKUPS LU10,
    FND_COMMON_LOOKUPS FCL,
    BOM_BILL_OF_MATERIALS BOM,
    MTL_SYSTEM_ITEMS MSI,
    BOM_SMALL_EXPL_TEMP BET,
    BOM_INVENTORY_COMPONENTS BIC,     
    BOM_OPERATIONAL_ROUTINGS BOR,
    BOM_OPERATION_SEQUENCES BOS,
    BOM_DEPARTMENTS BD               
    WHERE bet.component_item_id = msi.inventory_item_id
    and bet.bill_sequence_id = bom.bill_sequence_id
    and bet.organization_id = msi.organization_id
    and lu10.lookup_code (+) = bet.so_basis
    and bic.component_sequence_id(+) = bet.component_sequence_id     
    and lu10.lookup_type (+) = 'BOM_SO_BASIS'
    and fcl.lookup_code (+) = msi.item_type
    and fcl.lookup_type (+) = 'ITEM_TYPE'
    and fcl.application_id (+) = 401
    and ml2.lookup_code (+) = bet.wip_supply_type
    and ml2.lookup_type (+) = 'WIP_SUPPLY'
    and bet.assembly_item_id = bor.assembly_item_id(+)     
    and bet.organization_id = bor.organization_id(+)
    and bor.alternate_routing_designator(+) is null
    and bor.routing_sequence_id = bos.routing_sequence_id(+)
    and 10 = bos.operation_seq_num(+)               
    and bos.effectivity_date(+) <= sysdate
    and sysdate < nvl(bos.disable_date(+),sysdate + 1)
    and bos.department_id = bd.department_id(+)          
    /

  • Best way to spool DYNAMIC SQL query to file from PL/SQL

    Best way to spool DYNAMIC SQL query to file from PL/SQL [Package], not SqlPlus
    I'm looking for suggestions on how to create an output file (fixed width and comma delimited) from a SELECT that is dynamically built. Basically, I've got some tables that are used to define the SELECT and to describe the output format. For instance, one table has the SELECT while another is used to defined the column "formats" (e.g., Column Order, Justification, FormatMask, Default value, min length, ...). The user has an app that they can use to customize the output...which leaving the gathering of the data untouched. I'm trying to keep this formatting and/or default logic out of the actual query. This lead me into a problem.
    Example query :
    SELECT CONTRACT_ID,PV_ID,START_DATE
    FROM CONTRACT
    WHERE CONTRACT_ID = <<value>>Customization Table:
    CONTRACT_ID : 2,Numeric,Right
    PV_ID : 1,Numeric,Mask(0000)
    START_DATE : 3,Date,Mask(mm/dd/yyyy)The first value is the kicker (ColumnOrder) as well as the fact that the number of columns is dynamic. Technically, if I could use SqlPlus...then I could just use SPOOL. However, I'm not.
    So basically, I'm trying to build a generic routine that can take a SQL string execute the SELECT and map the output using data from another table to a file.
    Any suggestions?
    Thanks,
    Jason

    You could build the select statement within PL/SQL and open it using a cursor variable. You could write it to a file using the package 'UTL_FILE'. If you want to display the output using SQL*Plus, you could have an out parameter as a ref cursor.

  • Need sql query to import from excel sheet

    Hey , i need sql query to import from excel sheet.
    i work in a company where i need to daily update the data from excel sheet.
    if i get a shortcut method i ill be very thank full to you guys to reduce my work upto 10 %.

    any query which can inert from excel file?
    Sort of. Certainly not anything as simple as what you seem to hope for. Check out this very good PHP class:
    PHPExcel - Home

  • How to build an SQL Query to print Week ranges of a Month

    Hi Gurus!!
    I have a requirement to create a query to display the Week periods of a month.
    The inputs will be Year and month.
    The result should be some thing like this:
    If Year = 2009 and Month = June
    The SQL Query should return the following:
    01-Jun-2009 to 06-Jun-2009
    07-Jun-2009 to 13-Jun-2009
    14-Jun-2009 to 20-Jun-2009
    21-Jun-2009 to 27-Jun-2009
    27-Jun-2009 to 30-Jun-2009
    I am confused how to do this. Please help me. Any help would be grately Appreciated.
    Thanks
    Ahmed

    This is how My Final Query Looks Like:
    SELECT TO_CHAR(SYSDATE+7*(level-1),'DD-MON-RRRR')
    ||' to '
    ||TO_CHAR(SYSDATE+7*(level-1)+6,'DD-MON-RRRR') RANGES
    FROM dual
    connect by level<=5
    --Ahmed                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQL Query to print 1-n numbers?

    for(int i =0; i<n i++)
    We can print 1-n numbers on the console by using above loop.
    In the sameway How I can display 1-n numbers on SQL console by using SQL Query..?
    Can any body help me regarding this?>

    SowmyRaj wrote:
    hi justin.... thanks for ur answer.... can u give me ur yahoo or gmail id?Now, i'm really stunned by your so many rapid posted threads and that too you can do yourself if you invested some time and make some R&D work.
    I don't want to hurt your feeling but i think you should invest some time to do this job. Or, you can get plenty of related solution and then you have to customize those to your required solution. Only that will help you to earn knowledge.
    You know one general suggestion -> Try to do the solution by yourself. If you stuck or don't have any clue then post it here - we will post the clue or post your required solution if you stuck.
    We are always there to help you. Don't mind.
    Regards.
    Satyaki De.

  • Sql query runs slower from the application

    Hi,
    We are using oracle 9ias on AIX box.The jdk version used: 1.3.1 . From the j2ee application when we perfom a search, the sql query takes for ever to return the results. I know that we are waiting on the database because I can see the query working when I look at TOAD.But if i run the same query on the database server itself, it returns the results in less than a sec. Could you guys throw some light on how we could troubleshoot this problem. Thanks.

    When the results have to travel over the network, it is slow, and when they don't, it is fast.
    That is what you are saying, correct?
    So your approach should be to not bring so much data over the network. Don't select columns you don't need, and don't select rows you don't need.

  • SQL Query (Migrating report from SMS 2003 and SCCM 2012R2)

    Hello everyone,
    I solicit you because I have to work on migrating reports from SMS 2003 and SCCM 2012 R2.
    The following SQL query causes me some problems:
    SELECT DISTINCT SYS.Netbios_Name0 AS Computer, (SELECT SUM(ProcAddtl.NumberOfLogicalProcessors0) FROM v_GS_Processor_Addtl0 ProcAddtl WHERE ProcAddtl.ResourceID=SYS.ResourceID) [Cores], CS.NumberOfProcessors0 AS CPU, CPU.MaxClockSpeed0 As Speed, CPU.Name0, MEMORY.TotalPhysicalMemory0/1024 AS [RAM Mb], (SELECT LDISKS.Name0 + '=' + CONVERT(varchar(15), LDISKS.Size0/1024) + ' | ' as 'data()' FROM v_GS_LOGICAL_DISK LDISKS WHERE LDISKS.ResourceID=SYS.ResourceID AND (LDISKS.Name0='C:' OR LDISKS.Name0='D:') ORDER BY LDISKS.Name0 FOR xml path('')) [Logical Disk (Gb)], (SELECT LDISKS.Name0 + '=' + CONVERT(varchar(15), LDISKS.FreeSpace0/1024) + ' | ' as 'data()' FROM v_GS_LOGICAL_DISK LDISKS WHERE LDISKS.ResourceID=SYS.ResourceID AND (LDISKS.Name0='C:' OR LDISKS.Name0='D:') ORDER BY LDISKS.Name0 FOR xml path('')) [Free Space(Gb)],CS.Manufacturer0 AS Manufacturer, CS.Model0, OS.Caption0 AS 'OS', (SELECT CONVERT(varchar(10), NIC.Index0) + '=' + NIC.IPAddress0 + ' | ' as 'data()' FROM v_GS_NETWORK_ADAPTER_CONFIGUR NIC WHERE NIC.ResourceID=SYS.ResourceID FOR xml path('')) [Network], (SELECT Count(Name0) FROM v_GS_SCSI_CONTROLLER SCSI WHERE SCSI.ResourceID=SYS.ResourceID AND SCSI.Name0 Like '%Qlogic%') [# FC HBA], INFONOYAU.RoleServeur0 AS Role, INFONOYAU.Zone0 AS Zone
    FROM v_R_System SYS
    LEFT JOIN v_GS_COMPUTER_SYSTEM CS ON CS.ResourceID = SYS.ResourceID
    LEFT JOIN v_GS_PROCESSOR CPU ON CPU.ResourceID = SYS.ResourceID
    LEFT JOIN v_GS_X86_PC_MEMORY MEMORY ON MEMORY.ResourceID = SYS.ResourceID
    LEFT JOIN v_GS_OPERATING_SYSTEM OS ON OS.ResourceID = SYS.ResourceID
    LEFT JOIN v_GS_Informations_Noyau0 INFONOYAU ON INFONOYAU.ResourceID = SYS.ResourceID
    LEFT JOIN v_FullCollectionMembership COL ON COL.ResourceID = SYS.ResourceID
    WHERE COL.CollectionID = @CollectionID ORDER BY SYS.Netbios_Name0
    Can a charitable soul help me to migrate this query to a SCCM 2012R2 report?

    The following SQL query causes me some problems:
    Why? What's happening?
    Torsten Meringer | http://www.mssccmfaq.de

  • SQL Query - Multiple records from value of field

    I have a table that has the following lay out
    ID
    AreaUnitServes
    Filter1Quantity
    Filter1Size
    Filter2Quantity
    Filter2Size
    And I’m trying to convert it to
    FkPSAUnitsID
    Size
    Location
    I’ve got the following query started but I’m stuck on how to INSERT INTO multiple records by the value of Filter1Quantity. I also have to query for Filter2Quantity.
    INSERT
    INTO RapidServ.dbo.PSAFilters
    (FkPSAUnitsID,Size,Location)
    SELECT ID
    AS FkPSAUnitsID,Filter1Size
    AS Size,
    AreaUnitServes
    AS Location
    FROM RapidServ.dbo.PSA
    Thanks,
    why767

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I have a table that has the following lay out <<
    How nice for you! Why did you draw ASCII pictures?  It has all kinds of magical names. The table is nameless because it is forbidden by a wizard to speak its name? There are generic, universal “size” and “location”of nothing in particular. Is the “fk-”
    prefix a meta data design error for “foreign key”? We never do that in RDBMS; name a data element for what it is by its nature, not for how it was used in one place in one schema. This is why we have no magical “id” in a valid schema. Data elements do not
    change names from table to table. 
    You seem to have inherited a pile of garbage with a repeated group in it. Look up First Normal Form (1NF). You also do not know why row is not a record and why fields are  not columns. Did you notice that “area_unit_serves” is a sentence and not
    a name? 
    >> I’ve got the following query started but I’m stuck on how to INSERT INTO multiple records [sic] by the value of Filter1Quantity. I also have to query for Filter2Quantity. <<
    My guess until I get a usable business rules and DDL is that you can use a UNION something like this skeleton: 
    INSERT INTO PSA_Filters (psa_units_id, filter_size, area_service_unit)
    SELECT psa_units_id, filter_1_size, area_service_unit
      FROM Magic_Nameless_Stuff
    UNION ALL
    SELECT psa_units_id, filter_2_size, area_service_unit
      FROM Magic_Nameless_Stuff;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • ABAP SQL Query (Select data from intervals)

    Hi All,
    From    To      Temp
    101      200     1111
    201      300     2222
    301      400     3333
    401      500     4444
    501      600     5555
    From, To & Temp are three Fields.
    Consider the above table, if i enter input as 150, need to pick 1111.
    If the input is inbetween of From & To values means I want to pick the exact
    Data from temp field.
    Thanks
    Hema
    Edited by: hema prabakaran on Jan 19, 2009 7:54 AM
    Edited by: hema prabakaran on Jan 19, 2009 8:30 AM

    Hi
    Data: itab type table of tbl with header line.
    select * from tbl into table itab.
    if sy-subrc eq 4.
    Message E000(YJK).
    else.
            loop at itab.
             if v_temp between itab-from and itab-to.
                   write itab-temp.
                   exit.
             else.
                  continue.
            endif.
            endloop.
    endif.
    You can use the above code.
    It is not possible to use select stmt with your i/p variable in the where clause as that field is not present in table.
    hope this helps
    Regards,
    Jayanthi.K

  • Sql query need for date format''Mon 23 Apr 16:45 pm'

    i need SQL query to print date like 'Mon 23 Apr 16:45 pm' format

    SQL> select to_char(sysdate,'Dy fmddfm Mon hh24:mi pm','nls_date_language=american') from dual
      2  /
    TO_CHAR(SYSDATE,'DY
    Fri 27 Apr 13:04 pm
    1 rij is geselecteerd.Regards,
    Rob.

  • Is DTS supported in SQL server 2008 R2 with Compatibility level 100?

    We have a DTS package which executes one stored procedure.
    We have recently switched SQL server compatibility level from 80 to 100. 
    On Compatibility level 80 it was working fine.
    When i switched the level to 100, and executes DTS it shows successfully executed but stored procedure doenot really executed.
    When i execute stored procedure in query analyzer it executed successfully and results were as expected.
    Please let me know Is DTS supported in SQL server 2008 R2 with Compatibility level 100?

    We have just implemented DTS packages on SQL2008R2 using the Backward Compatibility Tools (serarch for SQLServer2005_BC.msi)
    You need the files:
    SQLServer2005_BC.msi or SQLServer2005_BC_x64.msi
    and SQLServer2005_DTS.msi
    After you install these, perform the following -
    1) To integrate DTS Designer with SSMS:
    Copy the files SEMSFC.DLL, SQLGUI.DLL, and SQLSVC.DLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn
    to %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
    Copy the files SEMSFC.RLL, SQLGUI.RLL, and SQLSVC.RLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033
    to %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Resources\1033
    2) To integrate DTS Designer with BIDS:
    Copy the files SEMSFC.DLL, SQLGUI.DLL, and SQLSVC.DLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn
    to %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE
    Copy the files SEMSFC.RLL, SQLGUI.RLL, and SQLSVC.RLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033
    to %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\Resources\1033
    T

  • Query for printing report if field 1 = x

    Forgive me if this is the wrong place to put this, My first time on here.
    I want to run a query in management studio 2008r2.
    The query goes like this:
    SELECT        [Default Branch ID], [Contact Title], [Contact FirstName], [Contact LastName], [Phone Home], [Phone Work], [Phone Mobile], [Marketing 1]
    FROM            Customer
    EXCEPT I want to display only entries that match [marketing 1] (Customer birth month) with current date. EG print all customers with details who have a birthday this month.
    How would I go about this?
    Thanks in advance!
    Ryan

    Hi
    There's no native way to automatically run a query and print from Management Studio.
    However are some native ways to push an email if that's any help:
    You could write a
    SQL Server Agent job to be scheduled once per month to send an
    email with information (not available on express and you need to setup dbmail)
    You could set up a
    Data Drive Subscription in Reporting Services to do much the same (Enterprise or BI Editions only). 
    Alternatively you could look at non-native solutions such as
    this. You're into the realms of windows scripts then.

  • SQL Query report region that only queries on first load

    Hello all,
    Is there any way in which you can prevent a SQL Query report region from quering data after every refresh?
    I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to show the change, but every time I reload the page the columns are queried and the original values are displayed once again...
    any ideas?
    -Mux

    Chet,
    I created a header process to create the HTMLDB_COLLECTION. It is something like:
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'Course_Data',
    p_query => 'SELECT DISTINCT COURSE_ID, HTMLDB_ITEM.CHECKBOX(14,COURSE_ID) as "checker", TITLE, SUBJECT, COURSE_NUMB, SECTION, ENROLLED, null as "temp_term", null as "temp_title", null as "temp_crse_id", null as "temp_subj", null as "temp_crse_numb", null as "temp_sect", FROM DB_TBL_A, DB_TBL_B, DB_TBL_C, DB_TBL_D, DB_TBL_E, DB_TBL_F WHERE ...');
    The names were changed, for obvious reasons.
    I then created an SQL Report Region to see if it would work. The SQL is:
    SELECT c001, c002, c003
    FROM htmldb_collections
    WHERE collection_name = 'COURSE_DATA'
    When I run the page it says:
    ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    Any idea why this is happening?
    I'm new to HTMLDB_COLLECTIONS, so I may be doing something wrong
    -Mux

Maybe you are looking for

  • Transferring pictures from Iphone/Itunes to PC

    Hi, Basics it may be but how exactly do I do this please? I need to get all the pics of my iphone before sending it back but looking at Itunes for two hours has got me nowhere near getting this minor task done! Can anyone help please? Thanks Dave

  • Last Logon date and Logon time not updating in table USR02

    Hi, Please help us on this. After customer successfully logged in the webshop, we are checking the table USR02 in CRM system and the Logon date and Logon time is not updated. Because of this, the customer will be locked after certain number of days.

  • How to scan more than one page with Acrobat 9, Windows 7?

    I have Acrobat 9 Standard, with Windows 7, and am trying to scan from an HP LaserJet 3015.  Prior to having Windows 7, there were no problems.  Now when I scan only one page will show as a pdf, no matter how many I scan.  The data shows "transferring

  • How to remove xmlns="" from the message

    some reason on the header node in the below message gets xmlns="" when the message is generated from BPEL. below is the output that generated. I want to remove xmlns="" from the message. <?xml version="1.0" ?><ProductMovementReport xmlns="urn:cidx:na

  • File size growth fr Aperture to Photoshop and back. Why?

    When i take a 15Mb file from Aperture to Photoshop, work on it in photoshop them save back into Aperture its grown to about 56MB back in Aperture, BUT why when i open the Adjustments HUD for this new file in Aperture does it make a new copy of the im