Programming :: Query To Compare Records Of Two Different Tables?

Dec 31, 2010

i am trying this query to compare records of two different tables...i m geting this message!! no required out putvalues for these ($jobTitle $industry $stationBase $gender $maritalStatus)are coming from textboxes!here is the code...

PHP Code:
$query = "(SELECT *,
MATCH(industry, gender, maritalStatus , typeofWorkPosition , preferCity) AGAINST ('$

[code]....

View 4 Replies


ADVERTISEMENT

General :: Query The Sdp Records On Local PC?

Sep 2, 2010

I'm using Net::Bluetooth to create an RFCOMM socket on my Linux box. I need for it to register with SDP with a specific UUID. The perl code can be viewed in this link. I am unable to make the connection from a remote device however. This remote device (my Android phone) is able to connect to other RFCOMM devices using this UUID. I would like to troubleshoot the problem, but I can't find a way to browse the LOCAL SDP records of my PC where the Perl script is running (and waiting for incoming BT connections). how to browse the SDP records on the local PC?

View 1 Replies View Related

General :: DNS Checking Tool - Check And Compare DNS Records

Dec 14, 2010

there is a tool, which can check and compare DNS records for me. I'd like to tell it to look at our private subnet, and it for to return records which have missing or different DNS records, than were expected. if it just looked up every record and returned it in a "neat" way, that'd work too.

View 5 Replies View Related

Programming :: Loop Through Records In A File?

Apr 23, 2011

I want to loop through the records in the below file (homedir.temp)
/home/user1
/home/user2
/home/user3

I want to do the following activities with each record1. du -s - to get the total usage for that directory (my variable name is SIZE)2. divide SIZE by du -c for /home to get the percentage of usage. (my variable name is PER)3. write the directory, SIZE, PER to a filePROBLEMI am using the below for loop: for record in homedir.tempthe mentioned activitiesdonehe above is not looping through the records. It does the first record perfectly and exits the loop.

View 14 Replies View Related

Programming :: Load Multiple Records Into SQLite?

Nov 19, 2008

I am using SQLite as my database for some portable cross platform applications I am working on with REALBasic as my IDE. I have an old Sybase 8.0 database that I can access via Microsoft Access and thereby extract the data I need from each table.

Now I know I can create .csv files from each table and load them into SQLite using the import tool, but then I can't define the primary key and other field attributes. So the other option is to load each file via SQL.

Now with most SQL editors I can create multiple queries and they will run just fine. But I can't seem to do that with the SQLite interfaces. I can paste multiple queries but I can only run one at a time. And by that I mean I have to click run.

Ummm that's not acceptable since my biggest table contains over 600,000 records. I have the queries all written, that was easy using a simple interface I wrote in Access.

Code:
INSERT INTO tblMeters(recordId,meterId,meterName,meterSerNum,registerSerNum,mxuSerNum,meterType,manufacture,meterModel,readType,groupId,multiplier,rollover,vendorId,xfrmerCode,bldgCode,CATEGORY,energyType,unitOfMeasure,location,access,comments,dateInstalled,dateCalibrate,pipeSizeIn,pipeSizeOut,elecMeterSpecs)

[Code]...

So is there another method I can use? I can't seem to find anything relating to my particular question at the SQLite web site

View 3 Replies View Related

Programming :: Parse A File Containing Billions Of Records?

Nov 17, 2010

I have to parse a file containing billions of records and populate them in the Data structure. I have used a lot of C++ class and creating objects of the class I am storing the information retrieved by parsing the file.

Now as the file become huge and number of objects become very large my code is getting bad_alloc error as it is not finding any space avalable in the heap for allocating new object.

Is there any way to parse the file?

View 7 Replies View Related

Programming :: MySQL Error When Creating FK In Tables

Dec 11, 2009

Can't single the cause of the error.

mysql> CREATE TABLE Shipment (
-> Shipment_ID INT(10) NOT NULL,
-> Delivery_ID INT(10) NOT NULL,
-> Customer_ID INT(10) NOT NULL,
-> Driver_Employee_ID INT(10) NOT NULL,
-> Consignee VARCHAR(255) NOT NULL,
-> Payment_Method VARCHAR(255) NOT NULL,
-> Payment_Received VARCHAR(1) NOT NULL,
-> CONSTRAINT PRIMARY KEY (`Shipment_ID`)
-> FOREIGN KEY (`Delivery_ID`) REFERENCES `Delivery`(`Delivery_ID`)
-> FOREIGN KEY (`Customer_ID`) REFERENCES `Customer`(`Customer_ID`)
-> FOREIGN KEY (`Driver_Employee_ID`) REFERENCES `Driver`(`Driver_Employee_ID`)
-> )ENGINE=InnoDB DEFAULT CHARSET=latin1;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (`Delivery_ID`) REFERENCES `Delivery`(`Delivery_ID`)
FOREIGN KEY (`C' at line 10)

View 4 Replies View Related

Programming :: Setup Array To Check Tables?

Nov 9, 2010

I want to specify about 10 tables that should be checked before the application starts, since if they are empty the results are not so good!

Here is what I have so far:

//specify what tables we want to check
$db_array =
array("attendance_codes","ethnicity","generations","grades","grade_terms","health_codes",$
//walk the array checking each table for more than 0 records

[code]....

it's not working,

View 2 Replies View Related

Programming :: Shell Script To Get Count Of Records In A Mysql Table?

Oct 23, 2010

I'm using MYTHTV with AT&T's U-Verse system. AT&T apparently turns off the set-top box if the box doesn't receive any commands after some number of hours. When this happens the box takes so long to turn on that it doesn't process the lirc IR channel change command. I've rewritten my channel changer to add a lockfile, and added a cron entry to kick off an entry to just "ping" the set-top box once an hour. But, OK, I'd like to play the bandwidth saving game and not do this if there isn't anything in the "record" table.

So, how would I write a script that will check the number of rows in the "record" table in the "mythconverg" database and exit if there are zero rows? I'm afraid I don't know how to even start this. Here is my "keepalive.sh" script that does the pinging:

Code:
#!/bin/sh
#if there are no rows in the record table, just exit this script
# lock the lockfile - MUST be same one as channel lock
while [ `lockfile "/tmp/mythchanlock.lck"` ]

[Code]....

View 3 Replies View Related

Programming :: Association Lists Are Faster Than Hash Tables?

Jun 13, 2011

I'm writing an interpreter and it used simple association lists for mapping varaible names to their values. Here's the code:

Code:

#include "assoc_array.hpp"
#include <string.h>
using namespace LANG_NAMESPACE;

[code]....

I thought that I would replace it with a hash table to increase performance. Note that I decided to store linked lists in the buckets instead of the actual values, in case the hash function outputs the same index for multiple variable names:

Code:

#include "hash_table.hpp"
#include "assoc_array.hpp"
#include <string.h>

[code]....

It runs in about 0.333 seconds on my machine. Since I'm using git version control, I decided to bring back the old version that used association lists. To my amazement, it ran 3 times faster, completing in 0.116 seconds! Is my hash table implementaion really that bad, or is this a really poor benchmark (and real-world code actually will be faster using the hash table)?

View 7 Replies View Related

Programming :: Compare Directory To .txt Or .xml ?

Dec 14, 2010

I have a database of around 4000 files. I use rsync script to transfer from 2 separate updated hdd every month but I need a way to compare a .txt file or .xml file to the updated drive as I cannot use rsync delete because I can not mount all 3 drives at the same time?

View 9 Replies View Related

Programming :: Parsing VoIP Call Detail Records (Field Format)

Jan 4, 2010

I am going to parse the Cisco voip CDR(Call Detail Records), please tell me the field format of the CDR files.

View 1 Replies View Related

Programming :: Locate The Tables In Versys The House Demographic Information?

Apr 28, 2010

I am trying to locate the tables in Versys the house demographic information, does anyone know the path?

View 1 Replies View Related

Programming :: Script To Compare 2 Columns ?

Mar 1, 2011

Actually build a script which can monitor the "DateTimeHourMinute" in a data file.

I wanted to compare the "DateTimeHourMinute" from the 2nd column against "DateTimeHourMinute" on the 3rd column which located in the same line.

Below is the data sample:

View 7 Replies View Related

Programming :: Compare The Filenames Without Extensions?

Jan 3, 2009

I have a large number of files, all of them named /*/*.xyz I need to match them to potential files name /*/*.abc I have tried find -name *xyz |awk '// {print '$NF'}' | awk '{print $NF }' but the result has the full path I just need the filename without the extention, and without the full path.

View 5 Replies View Related

Programming :: Mysql Compare Two Rows

Aug 21, 2010

I would like to compare to mysql rows as follows:

Select count(*) from stocks2.historical where close*1.05 < (select open from stocks2.historical where date = date_add(date,interval 1 day))
and year(date)=2010;

The problem is with the "date" in bold... i want that date to be the date of the previous row. is there a way to do that purely with mysql? (naturally, i can write a script to go through and compare each date; what i'm asking for is a mysql solution.)

View 3 Replies View Related

Programming :: Bash - Compare Directory To Database?

May 23, 2011

I have a (rather large) database of mp3 track information. I also have several directories of the actual mp3s. I'm trying to write a simple bash script that will check the contents of the directories against what's in the database, and upon finding a file that isn't in the database, do something.

Here's what I have so far:

Code:

The trouble I'm having (in the sample directory of "/mnt/music/B/Beatles, The/" the file "Beatles, The - Taxman.mp3" isn't in the database.) is getting it to actually trigger an error when an entry isn't in the database.

Once triggering on a non-entered file is working, any way to get it to traverse the entire /mnt/music hierarchy?

View 13 Replies View Related

Programming :: C Arguments To Main - Can't Compare Values?

Jul 24, 2011

Whats wrong with this:

Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
if(argv[4] == "-verbose")
{
printf("Verbose is on");

[Code]...

View 2 Replies View Related

Programming :: Compare Files With Fields Separated With ':'?

Jul 16, 2011

Dear expertsI have files like

ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01
VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01
SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01

[code]....

View 3 Replies View Related

Programming :: Compare Two Filenames Including The Paths?

Jun 22, 2011

I am trying to compare two filenames including the paths. Basically if two paths are similar then my program wants to display message. So I need to check for if two pathnames are same in the sorce and destination. So I was trying for the code to compare tow filename sincluding "" and if the Parent FIle Path is found in the child file path then I need to displays ome message. I was trying to modify something like this:

#!/bin/ksh
# Sample script
file1="C:TextLatestArticleNews.txt"

[code]....

View 7 Replies View Related

Programming :: Script To Compare Users In Files?

Mar 28, 2011

I have two files with user DN's that exported from two different LDAP directories. I wanted to write a script that reads(checks) users (cn=user1) in file Ack to see if users(cn=user1) exists in file B and give me nice output with what users are missing in file B.I have around 30k users in file A with following format..Quote:

cn=user1,ou=some,o=org
cn=user2,ou=some,o=org
cn=user3,ou=some,o=org

[code]...

View 7 Replies View Related

Programming :: Storing Grep Output To Feed Awk To Retrieve Entire Records Matching Variable

Jul 28, 2010

I have two files :

FileA
prot1
prot5
prot9
prot15

[Code]....

What I need to do is to extract from fileB the fields containing only the strings in fileA.

I thought awk could do the job easily with :

Code:
awk 'BEGIN { RS = "###" } /'$variable'/' fileB > output

where variable would maybe be the output of grep from fileA. So can I store the output of grep in a variable to use it afterwards with awk ?

something like that:

Code:
result=`grep prot. fileA` ; awk 'BEGIN { RS = "###" } /'$result'/' fileB > output
but that doesn't work. I'm always getting the entire fileB.

The output of grep get stored in the variable, I verified that with echo. So there is something that I just don't get... It seems to me that the above line should work.

View 11 Replies View Related

Programming :: Regarding Query Protocol On Internet?

Jul 17, 2011

There is a protocol in use - for example when I use Firefox to do a query through Google - as I type into the search field the browser sends my characters - one at a time - to the server. As I recall, at one time I found the specification but I'm pulling a blank. As I recall it does a POST of each character as I enter it, and the server responds before I have entered a <CR>. I want to write a client side program that uses that protocol and need to see the spec.

View 2 Replies View Related

Programming :: PHP & MySQL - Query A Database From The Web?

Apr 26, 2010

I have created a database which stores students grades for different stages of a project. One of the stages of the project is the specification part. I have a simple bit of html code which is going to be used as the searching facility. I want the user to be able to enter their ID and then it will display only their results. At the moment, it is displaying the results for EVERY student because I cant seem to find the correct syntax for my statement.

Heres the HTML code

<html>
<head>
</head>
<body>
<body bgcolor="#6881bb">
<center>

[Code]....

At the moment when i click the button, no matter what I enter every students marks appear on the screen.

I think, but obviously dont know for sure because if i did i would know how to solve the problem, the code that i need to change is in green.

View 3 Replies View Related

Programming :: Insert Query In Mysql ?

Jul 12, 2011

When i enter this query to mysql:

Code:

return this error:

Code:

when i delete the insert part :

Code:

query is ok:

Code:

1 row in set (0.00 sec)

View 2 Replies View Related

Programming :: Quick Query To Web Developers?

Mar 31, 2010

What is the code snippet required to get an image to repeat vertically up a page? I can only find info relating to repeating *background* images in my search attempts, and this is just a regular image file which I want to repeat over the pre-existing page background. I'd like it to repeat all the way up the extreme left hand edge of the page. Say the image is called abd.jpg and is in the same folder as the index.html.

View 14 Replies View Related

Programming :: Compare Two Md5sum Outputs To See If The Files Match?

Nov 5, 2010

I would like to compare two md5sum outputs to see if the files match. in my script I have

Code:

ORG_FILE="/path/to/org/file.zip"
NEW_FILE="path/to/new/file.zip"
MD5_ORIG=$(md5sum -b "$ORG_FILE")

[code]....

How do I get just the MD5 hash and not the */.... stuff so I can compare them. i tried Code: JUST_HASH=${$MD5_ORIG:0:32} but All I get is

dir_mon_notify.sh: line 79: ${$MD5_ORIG:0:32}: bad substitution

View 1 Replies View Related

Programming :: AWK: Compare Apache Dates Without Using Regular Expression

May 15, 2010

I'm writing a loganalysis application and wanted to grab apache log records between two certain dates. Assume that a date is formated as such: 22/Dec/2009:00:19 (day/month/year:hour:minute) Currently, I'm using a regular expression to replace the month name with its numeric value, remove the separators, so the above date is converted to: 221220090019 making a date comparison trivial.. but.. Running a regex on each record for large files, say, one containing a quarter million records, is extremely costly.. is there any other method not involving regex substitution? here's the function doing the convertion/comparison

[Code]...

View 13 Replies View Related

Programming :: Reading File And Compare In Bash Scripts?

Dec 9, 2010

how to program in bash, an i have a problem, i am trying compare values in between 2 values (from another file), so far my solution is to make a nested for loop, but that causes it to compare every value. Here is a visulization of what i want

file.a 2,3,4,5
file.b
3 5

[code]...

i want the values 2, 3, 4, 5 from file.a to be compared inbetween values 3 5, 6 9,1 2, 4 7 from file.b (var1 is the value im comparing, var2 is the less value, var 3 is the greater value)

for i in $var1
do
for k in $var2
do

[code]....

my problem with the above code is it compares EVERYINNG, not the values inbetween what i want (which is 3 5, 6 9 etc).

View 8 Replies View Related

Programming :: Compare Two Files Using Perl Or Shell Scripting?

Mar 8, 2010

I want to compare the following two tab-delimited .txt files (both were subsets of the original files) by comparing Columns 3 and 4 simultaneously. It is easy to compare C3 because both C3s are just numbers. But how to compare C4s?Basically, in File1, "G,G" = G in File2, "C,C" = C in File2, "A,A" = A in File2, "T,T"= T in File2.In File2, A/T in Column4 just equals "A,T" or "T,A" in Column4 of File1. C/T in Column4 just equals "C,T" or "T,C" in Column4 of File1, and etc.

File1:

C1C2 C3C4
ih509rs12345467244750"G,G"
ih499rs6049687244911"C,C"
ih508- 7244977"A,A"

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved