Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

Populate listbox with names of opened excel workbooks

$
0
0
Hi,

I need Access to check for opened excel workbooks and then populate a listbox with the names of the workbooks.
This is for getting the user to determine what workbook access then should continue processing.

I found the following piece of code which is a start, but it lumps the results together in a string. I need separate rows in the listbox.

Dim ObjXL As Object, xlWkBk, StrWkBks As String
' Test to see if there is a copy of Microsoft Excel already running.
On Error Resume Next
Set ObjXL = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
MsgBox "There are no opened Excel files"
Exit Sub
End If
For Each xlWkBk In ObjXL.Workbooks
StrWkBks = StrWkBks & vbCr & xlWkBk.Name
Next

MsgBox "The following Excel Files are open:" & StrWkBks

Set ObjXL = Nothing


Can anyone help me out?

Create next and Previous Buttons

$
0
0
Hi guys,
i am new to VB.
i have to make my final project at the university with VB and i have the following issue for start.
I must create an application with VB that will include my teacher's book so the student can read.
i did that with several forms.
i create buttons for next and previous but i dont know what i must write to the code so when i press the next button go to the next page and when i press the previous button go to the previous.
attached is the picture of how i create the projects.
is in Greek but i translate in English the next and previous button
Any help please

thanks in advance

Attached Images
File Type: jpg app.jpg (141.4 KB)

Summary Report

$
0
0
Is MS Access possible to output a summary using the database? It's a real-time database, someone is using it but it will be pulling the actual data. What I need is if is this possible if I will customized it manually instead of using reports?

Like, I want the view of:

Process - Time - Volume

Process, I will give the actual name of the process then the time will pull the data according to the process name, same as volume? Is it possible?

And is it possible to run in real-time? Attached file is the actual database, and the jpeg file is the form format, it will show the actual values according to the data indicated.

Attached Images
File Type: png Capture.PNG (25.0 KB)
Attached Files
File Type: zip BEMobile.zip (3.99 MB)

Expert Challenge: Complex Access 2010 Nested IIF argument - Can you HELP!

$
0
0
I hope I can articulate this in a manner that makes sense...

A sales person has 100s of customer relationships they must manage, in managing this relationship, we have identified 18 key activities to help strengthen the relationship. Each customer is in a 36 month contract, the sales person is required to complete 18 Activities within the 36 month term (these activities occur at different times within the 36 month term, please see attached). What I would like to deliver is a dashboard that provides a pivot and chart summary of when future activities are coming due for their customers.

Attached is the sample data from my table, it includes the customer_number "123456", ActivityName "Introduction", Due_Date "06/01/2014". I need help developing an MS Access 2010 db that will provide future projections (dateadd based on the due date and when the activity must occur) on the following.

Introduction letters must go out 30 days after due date (but they only occur once in the 36 month life cycle)
Kickoff email should go out 30 days after due date (but they only occur once in the 36 month life cycle)
True ups will occur once every quarter
etc...


Sales Person X has 2 introduction letters due in the month of August 2014, for the following customers.

Sales Manager Xs team has 45 introduction letters due:
10 due in July 2014,
10 due in August 2014,
25 due in September 2014, for the following team members

(There would be a pivot table with slicers for the the Sales managers and Sales Person names)

I would also like to include a chart that illustrates by activity how many are coming due (there would be a slicer for month and year)

I hope this makes sense.

Table Name Activity_Data

Customer_Number ActivityName Due

I think a datediff would allow me to do a future projection to include an all up count of what is coming due in 30, 60, 90, 120, 150, 180 days.....etc

Attachment 15583

Attachment 15584

What would be really cool, if I could create a form that will allow link to their email and send out the intro email and mark that activity complete. but this is a nice to have.... if there is anyone that skilled let me know.


That is a lot, I hope it makes sense....

Attached Images
File Type: jpg accessexample.JPG (60.0 KB)
File Type: jpg accessexample2.JPG (127.6 KB)

hardcoding a db-creation process or not: what is more flexible?

$
0
0
Hello dear db-experts - good day.

note; i run linux opensuse 13.1

the final goal is to get stored some xml-files in a mysql-database.
thats what i am looking for. - the xml-files are derived from a osm-request - at a OpenSteetpmap-api. and thats why i am here. Guess that you are good php and mysql-experts

well i play around with some openstreetmap-requests - and want to store the results in a Mysql-db.

see the tags:


Code:

id    lat    lon    name    amenity    operator    vending
see the table 'pois' that i want to create - and subsequently create some columns
Code:

see the SQL-Script

CREATE DATABASE `db123` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci;
USE hans;
 
CREATE TABLE `pois` (
  `id` BIGINT(20) UNSIGNED NOT NULL,
  `lat` FLOAT(10,7) NOT NULL,
  `lon` FLOAT(10,7) NOT NULL,
  `name` VARCHAR(255) COLLATE utf8_bin NOT NULL,
  `amenity` VARCHAR(255) COLLATE utf8_bin NOT NULL,
  `operator` VARCHAR(255) COLLATE utf8_bin NOT NULL,
  `vending` VARCHAR(255) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


first of all i thought that i can do the db creation with some hard coded methods: but instead of hard-coding the required column names as in


Quote:

$fields = array('id','lat','lon','name','amenity','operator' ,'vending');


we could use this to pick up any additional columns added to your pois table

Code:

$sql = "SHOW COLUMNS FROM pois";
$fields = array();
$res = $db->query($sql);
while ($row = $res->fetch_row()) {
    $fields[] = $row[0];
}

btw:



see the data
Code:

    <node id="2064639440" lat="49.4873181" lon="8.4710548">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="turkish"/>
        <tag k="email" v="info@lynso.de"/>
        <tag k="name" v="Kilim  - Café und Bar Restaurant"/>
        <tag k="opening_hours" v="Su-Th 17:00-1:00; Fr, Sa 17:00-3:00"/>
        <tag k="operator" v="Cengiz Kaya"/>
        <tag k="phone" v="06 21 - 43 755 371"/>
        <tag k="website" v="http://www.kilim-mannheim.de/"/>
      </node>
      <node id="2126473801" lat="49.4851170" lon="8.4756295">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="italian"/>
        <tag k="email" v="mannheim1@vapiano.de"/>
        <tag k="fax" v="+49 621 1259 779"/>
        <tag k="name" v="Vapiano"/>
        <tag k="opening_hours" v="Su-Th 10:00-24:00; Fr-Sa 10:00-01:00"/>
        <tag k="operator" v="Vapiano"/>
        <tag k="phone" v="+49 621 1259 777"/>
        <tag k="website" v="http://www.vapiano.de/newsroom/?store=29"/>
        <tag k="wheelchair" v="yes"/>
      </node>
   

      <node id="667927886" lat="49.4909673" lon="8.4764904">
        <tag k="addr:city" v="Mannheim"/>
        <tag k="addr:country" v="DE"/>
        <tag k="addr:housenumber" v="5"/>
        <tag k="addr:postcode" v="68161"/>
        <tag k="addr:street" v="Collinistraße"/>
        <tag k="amenity" v="restaurant"/>
        <tag k="name" v="Churrascaria Brasil Tropical"/>
        <tag k="phone" v="+496211225596"/>
        <tag k="wheelchair" v="limited"/>
      </node>
      <node id="689928440" lat="49.4798794" lon="8.4853418">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="greek"/>
        <tag k="email" v="epirus70@hotmail.de"/>
        <tag k="fax" v="0621/4407 762"/>
        <tag k="name" v="Epirus"/>
        <tag k="opening_hours" v="Mo-Sa 12:00-15:00,18:00-24:00"/>
        <tag k="phone" v="0621/4407 761"/>
        <tag k="smoking" v="separated"/>
        <tag k="website" v="http://epirus-ma.blogspot.com/"/>
        <tag k="wheelchair" v="no"/>
      </node>
      <node id="689928445" lat="49.4799409" lon="8.4851357">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="italian"/>
        <tag k="email" v="gianlucascurti@ristorante-augusta.de"/>
        <tag k="name" v="Ristorante Augusta"/>
        <tag k="opening_hours" v="Mo-Fr 12:00-14:00,18:00-23:00;Su 12:00-14:00,18:00-23:00"/>
        <tag k="phone" v="0621 449872"/>
        <tag k="website" v="ristorante-augusta.com/"/>
        <tag k="wheelchair" v="no"/>
      </node>



with the following fields in the db:


Code:

    CREATE DATABASE `db123` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci;
    USE hans;
   
    CREATE TABLE `pois` (
      `id` BIGINT(20) UNSIGNED NOT NULL,
      `lat` FLOAT(10,7) NOT NULL,
      `lon` FLOAT(10,7) NOT NULL,
      `name` VARCHAR(255) COLLATE utf8_bin NOT NULL,
      `amenity` VARCHAR(255) COLLATE utf8_bin NOT NULL,
      `operator` VARCHAR(255) COLLATE utf8_bin NOT NULL,
      `vending` VARCHAR(255) COLLATE utf8_bin NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

see the dataset; - which is stored in the file mysql.txt
the dataset - it is gathered from the request on the overpass-api which

resides here overpass turbo



you see a request on the left part of the screen

note: to get the output - just press the button in the top-menu called "Ausführen"

after this you press the button called "DATEN" on the top-right -
just below the green button called "flatter this": after pressing this "DATEN"-button you see the data in the right window of the screen.

note - it has got various ids - that means that the osm-file does not give back constantly all the tags...

the last question; does this make any problems to our project - does this has any influence on our db-connection...!?!?

see the output here:


Code:

    <node id="2064639440" lat="49.4873181" lon="8.4710548">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="turkish"/>
        <tag k="email" v="info@lynso.de"/>
        <tag k="name" v="Kilim  - Café und Bar Restaurant"/>
        <tag k="opening_hours" v="Su-Th 17:00-1:00; Fr, Sa 17:00-3:00"/>
        <tag k="operator" v="Cengiz Kaya"/>
        <tag k="phone" v="06 21 - 43 755 371"/>
        <tag k="website" v="http://www.kilim-mannheim.de/"/>
      </node>
      <node id="2126473801" lat="49.4851170" lon="8.4756295">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="italian"/>
        <tag k="email" v="mannheim1@vapiano.de"/>
        <tag k="fax" v="+49 621 1259 779"/>
        <tag k="name" v="Vapiano"/>
        <tag k="opening_hours" v="Su-Th 10:00-24:00; Fr-Sa 10:00-01:00"/>
        <tag k="operator" v="Vapiano"/>
        <tag k="phone" v="+49 621 1259 777"/>
        <tag k="website" v="http://www.vapiano.de/newsroom/?store=29"/>
        <tag k="wheelchair" v="yes"/>
      </node>
     
   
      <node id="667927886" lat="49.4909673" lon="8.4764904">
        <tag k="addr:city" v="Mannheim"/>
        <tag k="addr:country" v="DE"/>
        <tag k="addr:housenumber" v="5"/>
        <tag k="addr:postcode" v="68161"/>
        <tag k="addr:street" v="Collinistraße"/>
        <tag k="amenity" v="restaurant"/>
        <tag k="name" v="Churrascaria Brasil Tropical"/>
        <tag k="phone" v="+496211225596"/>
        <tag k="wheelchair" v="limited"/>
      </node>
      <node id="689928440" lat="49.4798794" lon="8.4853418">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="greek"/>
        <tag k="email" v="epirus70@hotmail.de"/>
        <tag k="fax" v="0621/4407 762"/>
        <tag k="name" v="Epirus"/>
        <tag k="opening_hours" v="Mo-Sa 12:00-15:00,18:00-24:00"/>
        <tag k="phone" v="0621/4407 761"/>
        <tag k="smoking" v="separated"/>
        <tag k="website" v="http://epirus-ma.blogspot.com/"/>
        <tag k="wheelchair" v="no"/>
      </node>
      <node id="689928445" lat="49.4799409" lon="8.4851357">
        <tag k="amenity" v="restaurant"/>
        <tag k="cuisine" v="italian"/>
        <tag k="email" v="gianlucascurti@ristorante-augusta.de"/>
        <tag k="name" v="Ristorante Augusta"/>
        <tag k="opening_hours" v="Mo-Fr 12:00-14:00,18:00-23:00;Su 12:00-14:00,18:00-23:00"/>
        <tag k="phone" v="0621 449872"/>
        <tag k="website" v="ristorante-augusta.com/"/>
        <tag k="wheelchair" v="no"/>
      </node>

well you see that i have some questions

the second one is regarding the variations in the mysql.txt - file
- i.e. the different number of tags.; How to make the script robust so that
it is able to work with this - and does not stopt to work....!?


well i hope i was able to make clear what i want to achieve:



can i use the code snippet to create the db table -
[CODE]
we could use this to pick up any additional columns added to your pois table
Code:

$sql = "SHOW COLUMNS FROM pois";
$fields = array();
$res = $db->query($sql);
while ($row = $res->fetch_row()) {
    $fields[] = $row[0];
}

note: i need to have a robust way - where i can cope with xmlfiles that are

full with additionals tags /(that make it necessary to have more collumns added.

I look forward to hear from you

many many greetings

well at this point it is pretty clear: what is better
hardcoding a db-creation process or not: what is more flexible?

Access 2007 - Exclude columns that have blank field in a report

$
0
0
I'm currently trying to complete a database in access 2007 for my training section. My current issue is when trying to look to see who has what classes by using a report i get all students.

My report only has Last name, First name, age, office symbol, course title.

Im trying to make it so when i bring up the report it only list those students that have a date under course title.

Slave won't reconnect after VPN Failure

$
0
0
Hi,

I am currently facing a problem where my slave node will not reconnect to the master after a VPN disconnect. The VPN provides connectivity from our slave to our master. We have 3 servers configured using Postgres 9.3.4 on Centos. The first 2 servers are co-located in the same network, with an high availability master/slave configuration being managed by a Linux-HA. The 3rd server is our problem child the resides on a different network and uses a VPN to establish connectivity to the master.

Problem:
After successfully establishing replication (verified by querying pg_stat_replication), if the VPN gets disconnected and then reconnected the slave does not reconnect to the master. The slave postgresql needs to be restarted in order for it to re-establish connectivity

Items tried:
-Verify that WAL_SENDER_TIMEOUT and WAL_RECEIVER_TIMEOUT has been set to 0 (i.e. disabled) on all three servers
-I verified that the replication successfully recovers after a network stop. For example, I issued a service network stop, waited 10 minutes, issued a service network start and then the slave successfully connected to the master.
- the pg_log file does not show any message when the VPN is stopped or anything referencing it cannot connect to the master


Any help or additional troubleshooting steps are appreciated.

Joe

Please help immediately

$
0
0
:eek:

I deleted entire rows from my backend file and now i can't change my any property for any field either in backend or front end.
I am getting error ----- The settings you entered isn't valid for this property.

When i am trying to change anything in entire database

I am scared of loosing my database. Please help.

Need tablespace increase info

$
0
0
Hi ,

While increasing the tablespace how to decide whether we have to add container or resize the existing container or extend the tablespace container.
What is the maximum size of the tablespace from it we cannot increase the tablespace. How to calculate this?

Can anyone elaborate this with example.



Thanks in advance :)

DB2 SQL replication upgrade

$
0
0
I have a problem when running db2 sql replication after upgrade to 10.5 from 9.7.

here the short story.
I have db A and db B.
db A is capture server & apply server.
db B is apply server.
I also have 1 server control with intall db2 data server client. this I use for create table space capture, apply, add the table for replication, start capture service and also activate the capture for table.

On db2 version 9.7, sql replication run well.
I have config on sql replication is only do capture on db A table to CD table.
I don't do apply on db B. DB B I need because I cannot activate capture on db A if I don't create apply table.

After I finish to upgrade db on db A and B, and also do upgrade on table-table catalog and also table CD on sql replication, I do upgrade client on server control. after I do is also upgrade instance. is finish and successful.

After all I finish, I try to open gui db2rc (db2 replication) on server control.
Gui can open, but it still loading, I can drill down sql replication menu, but all my config before upgrade is gone.

I try to run the service capture from db A. But after upgrade I must run the service with option startmode = cold. the service can run.
But I can not activate the capture. usually I do it from server control with GUI db2 replication, on apply subset I right click on which table I want it, and choose full refresh with manual option.

If the db2rc on server control cannot run well and the config gone, I don't know how can I activate the capture.

Anyone can help to solve this ?

Thanks before.

Hendra

Function wich return table

$
0
0
Hello to all

I would like to modify a function so you do not have to use cursors. I would like the function I returned a table and avoid having output parameters (in this case the two sliders returned) but only input.
This is because I am developing an application in QT and I can not handle the return of the sliders for more parameters assigned as output.

thanks
Code:

This is the code:
-- Function: f_get_missionplan_filter(refcursor, refcursor, numeric, text, text, text, text, text) 
 
-- DROP FUNCTION f_get_missionplan_filter(refcursor, refcursor, numeric, text, text, text, text, text); 
 
CREATE OR REPLACE FUNCTION f_get_missionplan_filter(refcursor, refcursor, numeric, text, text, text, text, text) 
  RETURNS SETOF refcursor AS 
$BODY$ 
 
DECLARE 
   
  v_message  character varying(300); 
  v_function  character varying(300); 
  v_operation character varying(300); 
  ret_log    smallint; 
  p_debug    smallint := 0; 
  sql        character varying(3000); 
  p_sens      smallint; 
  p_geom      character varying(500); 
  p_image    character varying(50); 
  p_video    character varying(50); 
  p_date_da  character varying(50); 
  p_date_fino character varying(50); 
  count_temp  smallint := 0; 
 
BEGIN 
 
  v_function := 'f_get_missionplan_filter'; 
  v_operation := 'select'; 
 
  p_sens      := $3; 
  p_geom      := $4; 
  p_image    := $5; 
  p_video    := $6; 
  p_date_da  := $7; 
  p_date_fino := $8; 
 
  EXECUTE 'SELECT COUNT(*) FROM information_schema.tables WHERE table_name=''temp_f_get_dati''' 
    INTO count_temp; 
 
  IF count_temp > 0 THEN 
    DELETE FROM temp_f_get_dati; 
  ELSE 
    EXECUTE 'CREATE TEMPORARY TABLE temp_f_get_dati ( 
            missionplanid bigint , 
            missionplanname character varying(50), 
            description character varying(200), 
            code character varying(10), 
            statusid bigint, 
            type character varying(50) 
            )'; 
  END IF; 
 
  if p_sens  = -1 and 
    p_geom = ''  and   
    p_image = '' and   
    p_video = '' and   
    p_date_da = '' and   
    p_date_fino = ''  then 
 
    sql:='insert into temp_f_get_dati 
        (missionplanid, missionplanname, description, code, statusid) 
        (SELECT distinct mp.missionplanid, 
                          mp.missionplanname, 
                          mp.description as missionplan_desc, 
                          mp.code, 
                          mp.statusid 
          FROM missionplan mp 
          WHERE mp.statusid = 8)'; 
 
  else 
   
    sql:='insert into temp_f_get_dati 
        (missionplanid,  missionplanname, description, code, statusid) 
        (SELECT distinct mp.missionplanid, 
                          mp.missionplanname, 
                          mp.description as missionplan_desc, 
                          mp.code, 
                          mp.statusid 
          FROM missionplan    mp, 
              missionplanuav m, 
              task          t, 
              targettask    tt, 
              target        ta, 
              areatype      at, 
              mission        mm'; 
                 
    if p_sens <> -1 then 
      sql:=sql||' ,sensortask st, sensor sen '; 
    end if; 
     
    if p_image <> '' or p_video <> '' then 
      sql:=sql||',source s '; 
    end if; 
         
    if p_image <> '' then 
      sql:=sql||',image i '; 
    end if; 
     
    if p_video <> '' then 
      sql:=sql||',video v '; 
    end if; 
     
    sql:=sql||' where t.missionplanuavid = m.missionplanuavid and mp.missionid = mm.missionid '; 
     
    if p_sens <> -1 then 
      sql:=sql||' and st.taskid = t.taskid and sen.sensorid = st.sensorid and sen.SensorTypeID = '||p_sens||' '; 
    end if; 
 
    sql:=sql||' and mp.missionplanid = m.missionplanid 
                and t.taskid = tt.taskid 
                and tt.targetid = ta.targetid 
                and ta.areatypeid = at.areatypeid 
                and mp.statusid = 8 '; 
                 
    if p_image <> '' or p_video <> '' then 
      sql:=sql||' and s.missionplanuavid = m.missionplanuavid '; 
    end if; 
     
    if p_video <> '' then 
      sql:=sql||' and v.sourceid = s.sourceid '; 
    end if; 
     
    if p_image <> '' then 
      sql:=sql||' and i.sourceid = s.sourceid '; 
    end if; 
     
    if p_geom <> '' then 
      sql:=sql||' and true = ST_Within(ta.geom,ST_GeomFromText('||quote_literal(p_geom)||')) '; 
    end if; 
     
    if p_date_da <> '' then 
      sql:=sql||' and date_trunc(''day'', m.executionstart) >= '||p_date_da||' and date_trunc(''day'', m.executionstart) <= '||p_date_fino||''; 
    end if; 
 
    sql:=sql||' and m.missionplanuavid = t.missionplanuavid)'; 
 
  end if; 
 
  EXECUTE sql; 
     
  open $1 for 
    select distinct * from temp_f_get_dati; 
     
  open $2 for 
    SELECT t.targetid, 
          t.targetname, 
          t.description as targetdesc, 
          tt.targettypename, 
          tt.description as targettypedesc, 
          a.areatypename, 
          a.description as areatypedesc 
      FROM missionplan          mp, 
          missionplanuav      mu, 
          missionplanuavtarget mput, 
          areatype            a, 
          target              t, 
          targettype          tt 
    where mp.missionplanid in (select distinct missionplanid from temp_f_get_dati) 
      and mu.missionplanid = mp.missionplanid 
      and mput.missionplanuavid = mu.missionplanuavid 
      and mput.targetid = t.targetid 
      and a.areatypeid = t.areatypeid 
      and tt.targettypeid = t.targettypeid 
      and mu.statusid = 8 
      and mu.mpuversion = '0.0'; 
 
  RETURN NEXT $1; 
  RETURN NEXT $2; 
 
EXCEPTION 
  WHEN OTHERS THEN 
    v_message := v_function || ' - ' || v_operation || ' - ERROR - ' || sqlstate || ' - ' || sqlerrm; 
    ret_log  := f_write_log(v_message); 
    RETURN NEXT - 1; 
END; $BODY$ 
  LANGUAGE 'plpgsql' VOLATILE 
  COST 100 
  ROWS 1000; 
ALTER FUNCTION f_get_missionplan_filter(refcursor, refcursor, numeric, text, text, text, text, text) OWNER TO postgres; 
COMMENT ON FUNCTION f_get_missionplan_filter(refcursor, refcursor, numeric, text, text, text, text, text) IS 'Function Filter on MissionPlan 
It returns a missionplan recordset and a target recordset by the selected filter with statusid equal to 8 (Completed) : 
Param 3 if is not -1, contains the id of the sensor type filter 
Param 4 if is not empty string, contains the target area to be filtered 
Param 5 if is not empty string, the images are filtered 
Param 6 if if not empty string, the Videos are filtered 
Param 7 filters between the start date of missionexecution and Param 8 the end date of missionexecution 
';

Web based Database

$
0
0
I've inherited a website which has a number of Access Databases, each about 380Kb in size, these do not have data written to them rather they are used to drive a quotation engine by supplying information to allow a calculation to be completed in Classic ASP.

Our web host wants these databases upgraded to MS SQL, plus the site has started to return various error code of an unspecified nature.

Would any one suggest upgrading the SQL, or changing the hosting company or both.

DBCC and update stats are running Very Slow in ASE

$
0
0
Hi,
In my production server, we are used to maintenance activity on a weekly basis.The maintenance script does the followings:
1.reorg rebuild, update statistics and sp_recompile for all tables in all databases.
2.dbcc checkdb, dbcc checkcatalog and dbcc checkalloc for all databases.
Last week it took more than 1 day to complete all these tasks, earlier it was taking average of 3 to 4 hrs to complete.
We checked for any process which is blocking, any deadlock, CPU utilization, locking and it was normal.
Please suggest if you have came across this kind of situations.

Export Access Report Excel/Word by value

$
0
0
Hi guys,
i am facing a challenge with report.
I need to get values from Access separated.
I have Report that will contain thousands of rows. Lets say each 400 row will have the same value in first Column.

So first 400 rows with the same value (lets say 1) in first column, different in other columns.
Second 400 rows different value (lets say 2) in first column, different in other columns.

Question is: is it possible to export this report to multiple tables in excel depends on first column value?
I wouldnt like to export whole report to the one excel sheet and then separating it into sheets based on these values from first column with macro. (or if you know macro that could do that easily i will appreciate it)

Create sheets from one sheet based on value

$
0
0
Hi guys,
i have Excel sheet with thousands rows.
Lets say that first 400 rows in first column contain the same value (lets say A), other columns different..
Second 400 rows have the same value in the first column (lets say B).

Is it possible to write macro that creates two sheets, first sheet will contain first 400 rows wit value A and secon sheet will contain second 400 rows with value B?
Could you give me an Idea how this macro should look like? i am newbie with macros :S

Split Database New Table

$
0
0
Hi Everyone,

I have a problem. I have a split database, and I added a new table to the back end recently.

How do I get the new Table to show up in the Front End?

We need to use this table in a query/report but can't access it since the link isn't in the Front End?

Help!

SQL Select - Formatted output of Decimal

$
0
0
Hello,

I have a question on a formatted output of a specific Decimal(19,4) field called units.

Example values within this column:
1985.471
178556.1
99999997896.4789

What I need to have within my SQL Select query is to show each of those numbers always with 5 decimals and no thousander separator (independent if they have 1, 2, 3 or 4) (missing decimals should be filled with 0 at the right). The figure could as well get transformed to a varchar, that does not matter here. (Similar to Access Function Format([units],'###0.00000')

For the above listed example numbers the output should look like:
1985.47100
178556.10000
99999997896.47890

I tried to do this with Round, VARCHAR_FORMAT but none of these solved my issue

Can anyone please let me know how this works?

Thanks very much in advance!

Junction table size and performance considerations.

$
0
0
Hello all,

I've been working on a data model for some time now and I'm facing a difficult decision with regards to a junction table. I have 2 entity types:

1. Building: may have somewhere in the order of 10-100 million entity instances.

2. Property: may have about 100-1000 instances and each Property is classified through its association with a PropertyType entity type.

The association between Building and Property is many-to-many (and qualified by the PropertyType ID if it makes any difference).

Obviously, I need a junction table to implement the association between the two. However, considering the sheer amount of possible combinations, I could end up with 100 billion tuples in the junction table, which to my limited experience seems a lot, especially since the 2 tables will need to be joined frequently.

I have a few questions:

a. Am I right on my conclusion? Can >100 billion tuples be too much for a junction table? Do you think indexing will help sufficiently? :/

b. The Property instances are part of the metamodel, so they're pretty much static. I was thinking of pre-combining them into a PropertyGroup type and relating PropertyGroup to Building instead. This is a N-1 relationship, which avoids lots of repetition, but on the downside every time I change my Property metadata I need to recalculate all the potential combinations of Properties and repopulate the PropertyGroup table. Plus, I'm getting a feeling this "flyweight-like pattern" messes up my data model on a conceptual level.

c. The idea has crossed my mind to implement the N-N association by burying an array of Property primary keys into the 1-end (Building). I'm fully aware this violates 1st normal form, but is it something I could argue for considering my circumstances? :/

That's it, all in all. Apologies for the long post and any insight would be very much appreciated!

Make a table with a Primary Key

$
0
0
I want to run a query to make a table, but at the same time adding a primary key to the table. The query only has two fields in it, the code and the quantity. I want the primary key to be on the code field. How can this be achieved?

cbo to subform

$
0
0
All; using access 2010. I had a blank form. I want use the form to put a combo box for custid. I use a query based on a table with custid and maxdescription for the record source. I created the combo box. Then I inserted a subform with custid description and other data to appear as datasheet view. During the insertion of the subform; it suggested that I use the maxdescription as link master and address as child link which I thought was odd. I changed it to custid for both master and child links. When I view the form; I used the combo box to select one of the custid’s that I know is in the subform. It didn’t select anything. I’ve done this hundreds of times and I can’t find what’s wrong! I planned to put code to filter; but this basic wizard should work without code! My initial thought was the datatype for both master and child links are text; but I have used this datatype in links before. Please help me figure this out.
Viewing all 13329 articles
Browse latest View live