One big one or many small ones?
I hope this comes across clearly....
I'm tinkering around with an application that will extract data from a
CRM program and dump it into a collection. The ultimate goal is to
get the data from the database into a MapPoint map. I can't go
directly from the database to the map because I need to be able to
move the data around before I plot it on the map.
If I have 100 records in my database, but I'm only displaying 50 on
the screen, I only want to map the 50 displayed, so doing a plain
SELECT * query on the database table won't work. Using the CRM
program's API, I can dump the ID numbers of the records displayed on
screen to a text file. I can then loop through the text file line by
line to grab the IDs necessary for my SQL query.
My question is this: Is it "better" to extract the data from the
database one by one and insert it into the collection one by one or is
it better to assemble a SQL query that will extract 10 (or 20 or 100
or whatever) at a time and insert them into the collection?
This is VB6 using ADO. I've done some speed tests myself, but I'm
wondering if there is a "best practices" that is followed in this
For smaller datasets, doing it one by one is pretty quick. When I
start getting into the realm of several hundred records, it starts to
bog down a bit.
Any similar experiences would greatly be appreciated.
...find files in one directory to use to search through another directory
I'm a beginner to intermediate user.
Here's what I am trying to do. I have a directory (call it X) with many
sub-directories with many .h files.
I want to use the names of the .h files in directory X to search
through another directory (call it Y) and see where the .h files from X
are included in the .h and .cpp files in Y.
In directory X I used the following command to find all the .h files:
find . -name "*.h"
The above command generates a list of all the .h files, but with the
path name. I don't want the path names, only the name of the file.h
Then I want to do a grep in directory Y and search in every .cpp and .h
file in Y to see if any of the .h files from X are used.
> I'm a beginner to intermediate user.
> Here's what I am trying to do. I have a directory (call it X) with many
> sub-directories with many .h files.
> I want to use the names of the .h files in directory X to search
> through another directory (call it Y) and see where the .h files from X
> are included in the .h and .cpp files in Y.
> In directory X I used the following command to find all the .h files:
> find . -name "*.h"
> The above command generates a list of all the .h files, but with the
> path name. I don't want the path names, only the name of the file.h
> Then I want to do a grep in directory Y and search in every .cpp and .h
> file in Y to see if any...How to read columns one by one from spreadsheet file
I am working on hydraulic test system control.I need to input my command from excel file point by point.any body now how to input from excel file pls help me.
What do you mean with "from excel file point by point"?
How is this excel file generated?
The simplest way is to save your Excel data as a csv (comma separated variable) file or tab separated txt file.
Then you can use the "read from spreadsheet file.vi" to pull the data into an array. After you have it in a LabVIEW array, you can maninulate it with the array tools (pull out a row or column at a time, pull out specific values, etc...).
...one to one relationship
I created 2 tables with one to one relationship. if I add a record in
table A, how does table B record get created? Does SQL do this
automatically because it is one to one relationship? or do I need to
create a trigger? if i need a trigger, how do I get the ID of new
record to create the same ID in table B?
thanks for any help.
> I created 2 tables with one to one relationship. if I add a record in
> table A, how does table B record get created? Does SQL do this
> automatically because it is one to one relationship? or do I need to
> create a trigger? if i need a trigger, how do I get the ID of new
> record to create the same ID in table B?
> thanks for any help.
> Joe Klein
From the standpoint of pure design: What justification is there for
two tables with a 1:1 relationship?
Daniel A. Morgan
(replace x with u to respond)
I understand what you are getting at- I can keep the data all in a
single table, but the 2nd table will have fields related to one aspect
of the application, which will be easier to maintain.
If you change the design to a single table you could create a view
containing the fields related to the one aspect of the application.
<email@example.com> wrote in message
> I understand what you are getting at- I can keep the data all in a
> single table, but the 2nd table w...One-One Relationship
Do you guys know what's wrong with a one-to-one relationship?
The reason I want to make it like this is that at the very end of the chain,
the set of keys is huge. I want to limit the number of columns to be the
key. i.e. the [company] table has 1 column as the key. The [employee]
table will have 2 columns as the key.
If I add a [sale] table to the [company]-[employee] relationship, the third
will have 3 columns as the key -- "company id", "employee id", and "sale
I have a company with many employees and computers. But instead of classify
all these, I just want to call all these as an entity. A company is an
entity. An employee is just another entity. etc.
So, instead of a one-to-many:
I make it one-to-one.
If I want to know the name and address of the entity "employee", I will have
a 1-to-1 table [employee] to look up the information for this employee
> There is no answer.
> There has not been an answer.
> There will not be an answer.
> That IS the answer!
> And I am screwed.
> Deadline was due yesterday.
> There is no point to life.
> THAT IS THE POINT.
> And we are screwed.
> We will run out of oil soon.
>> I want to limit the number of columns to be the key. <<
You missed t...Multiple processes; one file
I hope this one peaks some interest.
I recently inherited a rather kluge of a script.
To multithread this thing I need to enable two processes to copy files from
a single folder.
Maybe process A pulls from the top of the list and process B pulls from the
bottom of the list.
But what happens when they meet in the middle and processes A is copying the
file and process B comes along.
Will they not "stomp" on each other.
The "Ghetto" way is to create what I call "turd" files before the copy
begins and have process B check for the existence of this turd file before
executing on the file.
That's a little messy in my opinion.
There has got to be a more savvy way to do this.
Any thoughts or insight would be greatly appreciated.
I suppose the OS keeps the file handle on cases like this .
i don;t think so there are easy ways to capture this as we have tried
out many options
to prevent this. Unless some one else in the group has a better idea .
You can try using fuser -f "filename" and if none of the processes are
accessing it , allow
the process B to proceed.
I'm not sure why this is a problem - why can't two processes *copy* the
exact same file(s)? I tried this:
-rw-r--r-- 1 sybase system 1.4G 18 Apr 2006 17:33
unxr:/home/dbdumps/Backup>cp NISA_SQLZ.dbccdb.18Apr2006.17:31 a &
 ...one-to-one relationship
I have a table that I had split into 2 tables (for various reasons). The
problem is, I've seen a few instances of customers databases where it's not
creating the record in the 2nd of the one-to-one tables, especially when
they had imported their customers from another db, and no data existed for
the fields in the 2nd table.
How do I ensure that, if there is one record in one table with a particular
CustomerID, that it is also created in the 2nd of the one-to-one tables?
This would be for either new customers, or imported customer data.
...data one by one
Hello, first of all sorry for my english. I'm trying to get all samples of a signal. I have this values in an array (collected Y data), but i need to see it one by one. I put my file below. Can you help to me?
Thank you very much.
First of all, your array index is set at 150 (in the front panel), that means your array will start displaying at index 150. To view the other data, drag your display box (in gray) larger, then right click on the display box'es (in gray) most outer border, and select Visible Items->Vertical Scrollbar. Now you'll see you're way down in your array, either change the array index to 0, or use the scrollbar to go back up at the beginning of the array. Either way will do the same thing.
If you need to extract the data one by one, you'll need a loop. In sig52.vi, after all the data is collected, the VI will display the data one by one in "array data" like a slideshow (delay by 2 sec)
See-MingMessage Edited by Elsa Fung on 03-08-2006 06:28 AM
No, I want to see exactly all of values of the array da...one to one relationships
Does Access store two tables which have a one-to-one relationship, as if
they were just one table? I ask because in the db I'm making, there are a
few instances in which a one-to-one relationship seems appropriate. But my
reasoning is that for the same entity, sometimes several fields are relevant
only for some records. So putting those fields into a separate table would
keep the main table from having a lot of empty fields for many records.
But if Access stores the records as if they were in one big table, there's
no point in my splitting the table into two, is there?
This is still the db for the recreational tree climbing business.
Here's an example: tblJobProposals. The fields in this table all apply to
one or two people wanting a climb. If someone wants to arrange a climb for a
group, six more fields apply. So I make tblGroupProposals, with the same
JobProposalID so it's linked to the other JobProposal fields. (Also, of
course, the JobProposalID is a FK in other tables, so I don't want two
Does it save space and make sense to do it this way? TIA
No, Access does not store one-to-one relationship tables as though they were
a single table. If there is actually a record in the related table for each
record in the main table, there will be a bit of additional overhead. If
there are many empty records in the related table, you may save a bit of
disk space (but, on the other hand, these days disk space is both cheap and
fast). My choice...How to strmout one gds data according to one template file?
If I have one template file, I may run 'pipo strmout streamOutFile.il' to
stream out the gds data. How may I do it with skill code in CIW window?
BTW, since IC6.X use OA database, skill language will be dated and
abandoned, won't it?
On Tue, 17 Jul 2007 16:37:53 +0800, tech11 wrote:
> Hello everyone,
> If I have one template file, I may run 'pipo strmout streamOutFile.il' to
> stream out the gds data. How may I do it with skill code in CIW window?
> BTW, since IC6.X use OA database, skill language will be dated and
> abandoned, won't it?
Just do in skill:
system("pipo stremout streamOutFile.il")
On Tue, 17 Jul 2007 16:37:53 +0800, "tech11" <firstname.lastname@example.org> wrote:
>If I have one template file, I may run 'pipo strmout streamOutFile.il' to
>stream out the gds data. How may I do it with skill code in CIW window?
Guenther answered this. You can also use ipcBeginProcess()
>BTW, since IC6.X use OA database, skill language will be dated and
>abandoned, won't it?
No. Why do you think that? A lot of work has gone in to ensure SKILL
You can use the same SKILL functions to access the database - the SKILL API was
always a layer on top of the actual database implementation - all that has
happened is that the underlying database implementation has change...List all files in directory (only one level deep)
I am new to AIX and need to get a listing of all files and
subdirectories in a specific directory.
For example: a listing of /home/xxx.
I was able to get this done with the following two commands:
find /home/xxx/* -prune -type -f >listing.txt
find /home/xxx/* -prune -type -d >>listing.txt
with the following results:
Problem 1: I need two lines of commands to get the file populated.
Problem 2: The file is not sorted 'f' (from the files) before 'd' (from
the directories) which would take another step to do.
Question: is there a more efficient way of doing this (preferably with
one command line) and have the listing sorted alphabetically?
Any helpful input would be appreciated.
ls -d /home/xxx/*
ls -1 /home/xxx
Thanks for the tip. I tried both ways and this will work.
...UPDATE/INSERT to make One-to-Many table become One-to-One
I have a scenario where two tables are in a One-to-Many relationship
and I need to move the data from the Many table to the One table so
that it becomes a One-to-One relationship.
I need to salvage the records from the many table and without going
into detail, one of the reasons I can't do the opposite as
there are records in the ONE table that I need to keep even if they
don't have any child records in the MANY table.
Below I created the code to create the sample tables:
1- tblProducts is the ONE side table
2- tblProductDetails is the MANY side table
3- tblProductsResult is the RESULT I expect to get after running
some T-SQL code
4- tblProductComponents is another MANY side table to tblProducts
5- tblProductComponentsResult is the RESULT I expect to get...
Some of the points to consider:
6- Normally all UniqueID columns are to be IDENTITY. For
this sample i am entering the UniqueID values myself.
7- I don't want to create new tables like tblProductsResult
and tblProductComponentsResult. I want to update the real tables.
I have created the tblxxxResult tables only for this post.
8- The goal is to update the name of the Product by giving it the
name of the first matching Name from tblProductDetails.
9- If there are more than one entry in tblProductDetails for each
Product, then I need to create new Products inheriting the original
Product's information including its child records from tblProductComponents.
If you run the code and open the tables it will be...Copy a file from one directory to another from a SAS program?
Is there a way from SAS to copy a file from one directory to another? =
I am exporting 200+ sheets from an Excel 2007 workbook and there is one =
sheet that I do not want to process like the others, so I'd like to move =
it in my SAS program to another folder.
...One-to-one relationships as feedback
I have an mdb with a *projects* table. I also have a *timecode*
Projects and timecodes are related by a one-to-one relationship but I
do not want to simply add the timecode field to my projects table for
the following reasons:
-Not all projects have a timecode
-Not all timecodes have a project initially.
The timecodes table can be viewed as a pool of codes. We add a series
of available codes to the table and assign them to projects as time
goes by. When we're out, we add more.
I thus would like to be able to assign a timecode to a project from
the projects table. This is easily done. The tricky part is:
I would like there to be some of way to feedback this assignment to
the timecode table in such a way that it is possible to open up the
timecode table and see which codes have been assigned and which ones
are still available.
I'm looking for a simple way of implementing this. I'm not using
forms or anything fancy. Users of my db will simply edit tables
manually. I'm basically building something between an excel
spreadsheet and a full scale db with ui.
Many thanks for considering this.
On Thu, 21 Jun 2007 18:20:40 -0000, Shogun <email@example.com>
>I have an mdb with a *projects* table. I also have a *timecode*
>Projects and timecodes are related by a one-to-one relationship but I
>do not want to simply add the timecode field to my projects table for
>the following reasons:
...files, directories, files, directories
I've been trying to make a decision and it's driving me crazy.
Is a directory a file or is a directory NOT a file but a node?
Should I have
public interface IFile
public interface IDirectory
public interface INode
public interface IFile
public interface IDirectory
Method A is nice cause IFile becomes the base "Node" type and you can use
names like "IFileName" which sounds nice compared to "INodeName" and fits
with the "FileSystem" moniker. A has the disadvantage that IDirectory has a
GetContent() method which isn't bad but can be considered a bit weird. It
probably wouldn't be too hard to make users think of everything as a file.
Method B is nice cause IDirectory doesn't have GetContent() -- that honour
belongs only to IFile. B is at a disadvantage when it comes to naming:
everything becomes a "Node". INodeName sounds rude compared to IFileName.
This method feels more "pure" cause you're specialising features completely.
Do you reckon I can get away with Method A? It doesn't seem as pure unless
you spend a long time convincing yourself that (for all intents and
purposes) a file *is* a node (it's just got a different name) and a
directory *is* a file.
A penny for anyone's thought...Re: Copy a file from one directory to another from a SAS program?
If you know the file names, you can do the 'X' command at some point to
execute a system command to move the file:
X "move /path/to/original /path/to/dest";
If you are on Windows (probably, since you are using .xls). Otherwise,
whatever command is native to your OS for moving files should work
within your 'X' command.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Thursday, July 31, 2008 2:05 PM
Subject: Copy a file from one directory to another from a SAS program?
Is there a way from SAS to copy a file from one directory to another?
I am exporting 200+ sheets from an Excel 2007 workbook and there is one
sheet that I do not want to process like the others, so I'd like to move
it in my SAS program to another folder.
...The Old Ones are the Best Ones
Musing on an old DOS based game called Wolfpack.
Battle of Atlantic game that let you attack conveys,
or conn destroyers protecting the conveys, or conn
merchant ships IN the convoys. And you could jump
from ship to ship in the course of a battle. If
your ship was in bad shape you could jump to another
on your side and fight on, or even jump into the enemy
ships attacking you.
...read in observations one by one
i have a macro to finish a certain calculation for a bunch of
observations. also i have another file which contains the list of the
observations. i know i can copy the observations into the parameters
of the macro by hard code. is there a auto way to do this.
for example i have 5 sales rep, i would like to calculate their sales,
expense, travel time..., and i have the macro the do this. i can use
hard code to call macro with different rep's name to do the
calculation and output with different files. i am wondering if it is
possible to read in the first name from the list file, do the
calculation and output, then read in the second rep. and so on. seems
like i need to use some loop code like do while or do until. but i
really don't know how to do it. anyone has idea? thanks,
...Re: Copy a file from one directory to another from a SAS program? #4
hi ... try this before using the X command ...
"NOXWAIT specifies that the command processor automatically returns to the SAS session after the
specified command is executed. You do not have to type EXIT."
the online doc has a good explanation of XWAIT and XSYNC (sounds like EXTINCT, hmmm... DOS)
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
> Yes, that does work
> X "move c:\dir1\test.txt c:\dir2\test.txt"
> It is however, leaving open the DOS command window. I tried:
> X "exit";
> and that did not work to close it. Would anyone know how to close it?
> ----- Original Message -----
> From: firstname.lastname@example.org
> To: email@example.com ; SAS-L@LISTSERV.UGA.EDU
> Sent: Thursday, July 31, 2008 2:58 PM
> Subject: RE: Copy a file from one directory to another from a SAS program?
> If you know the file names, you can do the 'X' command at some point to
> execute a system command to move the file:
> X "move /path/to/original /path/to/dest";
> If you are on Windows (probably, since you are using .xls). Otherwise,
> whatever command is native to your OS for moving files should work
> within your 'X' command.
> -----Original Message-----
> From: SAS(r) Discussion [mailto:...Re: Copy a file from one directory to another from a SAS program? #5
try before the statement:
shouldn't matter, but after the 'x' statement, you may want to turn the
option back on (i personally never do) with:
From: Mary [mailto:firstname.lastname@example.org]=20
Sent: Thursday, July 31, 2008 3:12 PM
To: Pettis, Matthew (Prof II&RS); SAS-L@LISTSERV.UGA.EDU
Subject: Re: Copy a file from one directory to another from a SAS
Yes, that does work
X "move c:\dir1\test.txt c:\dir2\test.txt"
It is however, leaving open the DOS command window. I tried:
and that did not work to close it. Would anyone know how to close it?
----- Original Message -----=20
To: email@example.com ; SAS-L@LISTSERV.UGA.EDU=20
Sent: Thursday, July 31, 2008 2:58 PM
Subject: RE: Copy a file from one directory to another from a
If you know the file names, you can do the 'X' command at some
execute a system command to move the file:
X "move /path/to/original /path/to/dest";
If you are on Windows (probably, since you are using .xls).
whatever command is native to your OS for moving files should
within your 'X' command.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV....how to change directoy using matlab CD to the folder that one of my m file is opend from?
I have an m file open in the editor, and it lives in say folder_A.
is there a way from Matlab to tell it:
please cd (make current folder) to the folder that this m
file open in the editor is located in? If there is more
than one m file open in the editor, I should be able
to select one
ofcourse, I can just type the command
But the path is too long, and Matlab does not seem to allow me
to copy the path shown at the top of the window banner so I
can paste it on the console window.
What would be nice, if from the editor itself, I can right-click
on the file window, and have a pop-up window open with an option
to 'cd to the folder this file is in'
I agree. Once Brett Shoelson at the Mathworks told me to put this at
the start of my code:
% Change the current folder to the folder of this m-file.
I think it maybe used to work but now it doesn't. It asks me to
change directory, or add to path before the m-file even runs and gets
to that code. I've put in a request to have an option to do some kind
of an auto-switch to the folder where your m-file lives when you try
to run it but I don't think they liked that idea, so we are stuck with
the annoying prompts all the time. It's especially bad for me because
I work on several different projects that live in different folders so
I'm always having to answer the prompt when an auto-switc...One process cant read data inserted by other process. Why?
I'm using ADO.Net and Access 2002.
I have two processes written in vc++ .net, lets call them for,
example A and B.
A opens a connection, do something and closes the connection.
Then A calls process B and waits it to finish.
B opens a connection, update the data, closes the connection and exits.
A opens a connection and reads the data that existed before
the updates made by process B.
Is the connection pooling to blame? I tried using a connection string
parameter "OLE DB Services = 0" to turn off connection pooling but
the problem still exists.
What more info do you need?
...append multiple RTF files to one RTF file
I am having difficulty finding a way to copy and append multiple RTF
files to one RTF file. I need to do this with a VB app or component.
Any information you have, ideas, limitation, etc... that you can pass
my way would be GREAT! Thank You.
"Jim" <firstname.lastname@example.org> wrote in message
> I am having difficulty finding a way to copy and append multiple RTF
> files to one RTF file. I need to do this with a VB app or component.
> Any information you have, ideas, limitation, etc... that you can pass
> my way would be GREAT! Thank You.
There are no easy methods to do this. What you are going to have to do is
every character you will need to check the font, font size, color etc....
On Tue, 28 Oct 2003 23:49:19 -0600, "John Smith"
>"Jim" <email@example.com> wrote in message
>> I am having difficulty finding a way to copy and append multiple RTF
>> files to one RTF file. I need to do this with a VB app or component.
>> Any information you have, ideas, limitation, etc... that you can pass
>> my way would be GREAT! Thank You.
>There are no easy methods to do this. What you are going to have to do is
>every character you will need to check the font, font size, color etc....
Depending on the format (i think the RTB can onl...including one XML file in another XML file
How can I include one XML file into another XML file (on the client
side, in Firefox)?
I think XInclude is just what I need, but Firefox doesn't support it:
It seems I also can use an "external entity reference", but that
depends on a DTD and I'm using XML Schema. Is it also possible with a
Schema and how can I do it?
Here is exactly what I'm trying to do:
Currently the 'library' element is inside the 'design.xml' file. I
want to put the library element into a separate xml file and include
it in all my design files. (I have a lot of designs and only a couple
The design.xml file contains a reference to an XSLT file that
visualizes the design. When you open the design.xml file in Firefox a
SVG (scalable vector graphics) file is created on the fly and shown to
I also have an XML Schema file that specifies what all the valid
elements in the design.xml file are.
Can someone show me an example that accomplishes this? That would be
> How can I include one XML file into another XML file (on the client
> side, in Firefox)?
I'm kind of new to XML, but let me take a stab at answering this.
Depending on what you want the client to do with the document, it
seems you might be able to accomplish this at th...