PostgreSQL - what are the best resources on the net?


PostgreSQL -what are the best resources on the net

Can anybody submit good links, tutorials, links to references, and recommended books

Posted On: Sunday 30th of December 2012 11:13:31 PM Total Views:  164
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Mysqlhotcopy error

, I'm having problem with mysqlhotcopy command, when I run the command I get the following errors: Quote: DBD::mysql::db do failed: Got error 12 from storage engine at /usr/bin/mysqlhotcopy line 467. Or Quote: DBD::mysql::db do failed: Lost connection to MySQL server during query at /usr/bin/mysqlhotcopy line 467. Please help me to fix this.
VIEWS ON THIS POST

118

Posted on:

Monday 29th October 2012
View Replies!

What are the drwbacks of indexing?

; Does creating indexes have any drawbacks of any kind Something like this Code: CREATE INDEX HIDINDEX on hotels (hotelname)
VIEWS ON THIS POST

81

Posted on:

Monday 29th October 2012
View Replies!

Character set of tables displays wrong in php

I have made a database. In MySQL, I have converted the table from latin1 to utf8, because some records in the table has a name like: mhlen. Searching in mysql works, but when I try to search in php (and search for mhlen) nothing is being displayed (I get the message that no record has been found), if I search for any other name I get (as it should) the record(s). Can anyone help me with this Here is part of the search code I use: PHP Code:
VIEWS ON THIS POST

117

Posted on:

Monday 29th October 2012
View Replies!

Help with complex join mysql query

, I am hoping someone could help. I have the below sql which use to work but have recently upgraded my server to a new os and mysql 5 , php 5. I know it should not make a different but now my query does not work and I can not figure it out. Maybe I just have a type in my sql that I am not seeing. So here is what I am trying to do I have a employees table which lists which employees are active with us (not term'ed) and also a teams table which tells me which staff is assigned to which supervisor (supervisors swap team members ever other month or so) So the query is to take the highest assign_date from each team member that is assigned to a specific supervisor where the staff member is also still active with us. here is my query PHP Code: $month='2'; $year='2010'; $mygroupwiseid='jdoe'; SELECTteams.rep,teams.assign_dateFROM( \tSELECTrep,MAX(assign_date)ASassignment,\t \tEmployees.EmployeeStatusID,Employees.GroupwiseID \tFROMteams,EmployeesWHEREMONTH (teams.assign_date)
VIEWS ON THIS POST

150

Posted on:

Monday 29th October 2012
View Replies!

Combining two queries into one statement

all, I am pretty new to MySQL and am having difficulty with the following issue. I need to have one sql statement that will show this: select min(salary) from employee join job_title on employee.job_title_id = job_title.job_title_id where exempt='yes' select max(salary) from employee join job_title on employee.job_title_id = job_title.job_title_id where exempt='no' The results should return the lowest salary for an exempt employee (no) and the highest salary for a non-exempt (yes) employee. I have tried doing it with where statements and the closest I got was showing the min and max salaries for both exempt and non-exempt employees. In order words I was returning 4 results instead of just the 2 I am trying to get.
VIEWS ON THIS POST

132

Posted on:

Monday 29th October 2012
View Replies!

Unknown column error, but I know the column exists

What I'm trying to do: Copy cust_id from the ad_order table to rest_id on the coupons table where ad_order.order_id and coupons.coupon_login are the same What I'm putting into phpmyadmin: UPDATE coupons SET coupons.rest_id=ad_order.cust_id WHERE coupons.coupon_login=ad_order.order_id The error: #1054 - Unknown column 'ad_order.order_id' in 'where clause'
VIEWS ON THIS POST

159

Posted on:

Monday 29th October 2012
View Replies!

Complex SELECT question

To start, this is a custom query for WordPress if anybody is familiar with it. I am trying to query two tables, wp_posts and wp_postmeta. I have it almost working as is, but I just want to know two things:Is this the most efficient way to do thisHow can I order the results by the sub-query aliases The query is as follows: Code: SELECT posts.*, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'a' AND post_id = posts.ID) as a, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'b' AND post_id = posts.ID) as b, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'c' AND post_id = posts.ID) as c, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'd' AND post_id = posts.ID) as d, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'e' AND post_id = posts.ID) as e, (SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'f' AND post_id = posts.ID) as f FROM $wpdb->posts posts LEFT JOIN $wpdb->term_relationships term_relationships ON(posts.ID = term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy term_taxonomy ON(term_relationships.term_taxonomy_id = term_taxonomy.term_taxonomy_id) WHERE term_taxonomy.parent = '3' AND term_taxonomy.taxonomy = 'category' ORDER BY a
VIEWS ON THIS POST

80

Posted on:

Monday 29th October 2012
View Replies!

QUERY IN mysql

hi guy, i have this query to make in the database but it is bring me more than especified in the query, there is a something wrong in my query $query = "SELECT * FROM solicitacao WHERE comp='Nao_respondida' and tec_userid='$alocado' or tec_nome='$area'";
VIEWS ON THIS POST

214

Posted on:

Monday 29th October 2012
View Replies!

Importing CVS?

I have an Excel sheet where the columns are named the same as a table I have in a MySQL db. I know I can export the Excel to CVS, but is there a straight forward way to import it into an existing table I know I can write a script to do it, and I have phpMyAdmin as well. What is the prefered way to do this
VIEWS ON THIS POST

24

Posted on:

Monday 29th October 2012
View Replies!

Setting up grants to remote into a mySQL DB on lynux

Created a 5.1 DB on a 9.0.4 ubuntu server and can open it up with the client OK on the server. Created a DB OK. I am wanting to connect from a vista machine and use the query browser & adminstrator applications. So I set grant permissions for root from my vista machine's IP, like so.. GRANT ALL ON *.* TO root@192.168.1.66 ; But get a 1045 error, access denied, when I try to login as root from 192.168.1.66 using mySQL query browser. I then try.. GRANT ALL ON *.* TO '%'@'%' ; Which I think should give everything to but still get the 1045 error. I can see the permissions set up in information_schema.USER_PRIVILEGES and can also telnet to the server on 3306 from the vista machine. This is the first time I have set up a server on a lynux machine but I think I have followed the steps OK, Can anyone see a problem
VIEWS ON THIS POST

124

Posted on:

Monday 29th October 2012
View Replies!

Am I doing this right?

Hi-- Building a new DB for a customer, they've got a lot of products that will have different prices for different customers. For example: Customer A will buy Product X for $1. Customer B will buy Product X for $2. Not a problem so far, but some products are available only to certain customers. For example: Customer C is the only customer who can buy Product Y. Product Y costs $5. I was thinking my DB would have three tables related like this: COMPANY_____PRODUCT__________PRICE id (pkey).........id(pkey).................id (pkey) .....................comp-id(fkey).........prod-id(fkey) Will this work as I've described
VIEWS ON THIS POST

106

Posted on:

Monday 29th October 2012
View Replies!

Change collation on table?

How would I change the collation on a table for all the fields (all the text fields)
VIEWS ON THIS POST

87

Posted on:

Monday 29th October 2012
View Replies!

Dreamcoder auto_increment?

Not sure this is the right forum, but still hoping for the best. I want to have a field in Dreamcoder that is an auto_increment but I can't seem to find it. I have tried googling the problem but no site has answered my question. What is the fieldtype for int auto_increment in Dreamcoder
VIEWS ON THIS POST

109

Posted on:

Monday 29th October 2012
View Replies!

SQL Syntax Problem

Hi , all the "\"s in one of my fields keep disappearing, the sql is here: Code: INSERT INTO `uploads` (followupid, filename) VALUES ("PHDJU08010921484668405299", "F:\OSPTracker\Uploads\PHDJU080109214846681011405339.exe"); the filename becomes: F:OSPTrackerUploadsPHDJU080109214846681011405339.exe Can someone help, im sure its simple, proberbly an escape char needed but im not great with SQL as you can tell...
VIEWS ON THIS POST

25

Posted on:

Monday 29th October 2012
View Replies!

Delete Column from table using SQL Script

How can delete column from Table using SQL Script
VIEWS ON THIS POST

131

Posted on:

Monday 29th October 2012
View Replies!

Can a Vertical Table be migrated to a Horizontal?

Folks. I need some help figuring out HOW to do something via SQL. So far I am at a loss as to even how to attempt this. (In SQL I think I can figure it out in Perl or PHP but would prefer it in the Dbase to be done I have multiple tables that are all linked via a unique ID. Each Table has a One to Many relationship. This would be an example of a single Table Field names Location Address Phone and Fax in the below example Location Address Phone FAX Unique Store1 XYZ 123 QWE 1 Store1 XYZ 456 ASD 1 Store2 ABC 098 ZXC 2 Store2 ABC 876 ERT 2 Deed results Location Address Phone Phone1 FAX FAX1 Unique Store1 XYZ 123 456 QWE ASD 1 Store2 ABC 098 876 ZXC ERT 2 Can someone give me a hint
VIEWS ON THIS POST

24

Posted on:

Monday 29th October 2012
View Replies!

Query help - Delete elements that are no longer valid from 2nd table

Say i have the following tables. 1st table ID SID 1 50 2 20 3 10 4 50 2nd table ID SID 1 40 2 50 3 10 5 20 6 90 I need to delete all SID's in table 2 (which are unique) that don't show up in table 1 (and the sid is not unique there) I'm stuck. Any suggestions
VIEWS ON THIS POST

107

Posted on:

Monday 29th October 2012
View Replies!

More mysql errors from hell

theres a syntax in this query apparently.. any ideas query: SELECT userID,orderID FROM users_invoices FROM users_invoices WHERE invoiceID='33737' and invoicePaid is NULL and invoiceDue>=NOW() and manual='0' and ForceStatic is NULL mysql_error: 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 'FROM users_invoices WHERE invoiceID='33737' and invoicePaid is NULL and invoiceD' at line 1 any ideas edit: deedeedeee i wrote the FROM part twice
VIEWS ON THIS POST

165

Posted on:

Monday 29th October 2012
View Replies!

SHOW PROCESSLIST and load

I have a LAMP webserver that regularly has pretty high load. I know that some of this is coming from mysql, but I don't know that much about assessing load for it. When I enter SHOW PROCESSLIST at the mysql prompt, I see dozens of processes, (regularly about 50-60) and they all have the following status: Code: Command | Time | State | Info Sleep | 16078 | | NULL | Sleep | 8977 | | NULL | Sleep | 4280 | | NULL | Sleep | 11612 | | NULL | Sleep | 3056 | | NULL | Sleep | 15438 | | NULL | I looked through the mysql docs a little bit, but it didn't explain the Sleep command with a blank state. Also, isn't the time a little high The docs seemed to indicate that these processes shouldn't be around that long. Any guidance with this and mysql load assessment in generaly would be much appreciated.
VIEWS ON THIS POST

71

Posted on:

Monday 29th October 2012
View Replies!

GROUP by problem

Im having problems trying to figure out how to run a query that lists all telephone numbers, their networks, and how many messages they have sent since a certain date. I thought I had it with the query: SELECT received.number, network , count( * ) AS the_count FROM received WHERE sent >= '2006-08-20 00:00:00' GROUP BY number However on more analysis I realised that the_count was a count of all the messages they have ever sent. I need the_count to be a count of messages from the date of the sent variable '2006-08-20 00:00:00'. Can someone point me in the right direction
VIEWS ON THIS POST

79

Posted on:

Monday 29th October 2012
View Replies!

Triggers

Is there a way for me to use triggers to CALL a procedure when a row is INSERTed that has a column with a particular value (i.e. WHERE column='somevalue' ). Or should this be in my stored procedure
VIEWS ON THIS POST

33

Posted on:

Monday 29th October 2012
View Replies!

Joining tables not working as expected

I'm not getting an SQL query to work as designed, and I would love if someone could point me where I'm going wrong. I have two tables, one is rankings, the other is data. I rank people in the rankings table and all their data is stored in the data table (like height, weight, etc). Right now, I have two columns in rankings, the id auto increment field and the id for the person's id. SELECT d.name,d.id FROM data AS d,rankings AS r where r.user_id = d.user_id; Basically, I want it to select all the users that are in the ranking table (in the order they're ranked, which is specified by the auto_increment value) and return their name. For some reason, this query executes with an empty set. Any suggestions
VIEWS ON THIS POST

59

Posted on:

Monday 29th October 2012
View Replies!

RSS Feed PHP Mysql date problem

I have just put my first feed together taken from a mysql database. The problem I have is my feeds are showing the same date and time even though they have been added at different times. Here is my mysql query taken from my xml file: PHP Code: \t\t \t\t \t\t \t\thttp://www.****.co.uk/news/newsresult.phpid= \t\t \t\t Is there something wrong with my sql query The date it returns is Tuesday 03:14am on every feed.
VIEWS ON THIS POST

163

Posted on:

Monday 29th October 2012
View Replies!

Newbie SQL Question

1st, please forgive my ignorance as I am new to this... In a database I have a table [members] with the following fields/data Code: ID | Name 1 Jane Doe 2 John Doe 3 Baby Doe 4 Dad Doe Code: have a second table [games] with the following ID | GameNo | Time | Date | Referee | Lin1 | Lin2 1 BAN-1 N/a N/a Jane Doe John Doe Baby Doe 2 MID-1 N/a N/a John Doe Jane Doe Dad Doe 3 PEW-1 N/a n/a Jane Doe John Doe Baby Doe What I want to do is display the members table with another field that counts the number of time their name shows up in the games table...for example: Code: ID | Name | No.Games 1 Jane Doe 3 2 John Doe 3 3 Baby Doe 2 4 Dad Doe 1 Can this be done in with a single SQL statement or do I have to run it through a for nect loop of some sort\t\t Thans to anyone who can help
VIEWS ON THIS POST

25

Posted on:

Wednesday 7th November 2012
View Replies!

Lookup Items

In access you can list the contents of a field in a different table using lookup. Can you do the same in Sql. Cheers
VIEWS ON THIS POST

56

Posted on:

Wednesday 7th November 2012
View Replies!

SQL Connection using web.config

hi... the attach img is my error.. and following is my code: Code: Dim connection As SqlConnection Dim strCon As String Dim sqlcmd As SqlCommand Dim builder As New StringBuilder builder.Append("INSERT INTO Profile ") builder.Append("(") builder.Append("name,") builder.Append("userid,") builder.Append("password,") builder.Append("gender,") builder.Append("email,") builder.Append("birthDate,") builder.Append("contact") builder.Append(") ") builder.Append("VALUES ") builder.Append("(") builder.Append("'" & name.Text & "', ") builder.Append("'" & username.Text & "',") builder.Append(("'" & pass1.Text & "', ")) builder.Append(("'" & gender.Text & "', ")) builder.Append(("'" & email.Text & "', ")) builder.Append(("'" & birth.Text & "', ")) builder.Append(("'" & contact.Text & "'")) builder.Append(") ") strCon = ConfigurationManager.AppSettings("ConnectionString") connection = New SqlConnection(strCon) sqlcmd = New SqlCommand(builder.ToString, connection) connection.Open() sqlcmd.ExecuteNonQuery() i m trying to get the pre defined connection string that is in my web.config file of my website..
VIEWS ON THIS POST

104

Posted on:

Saturday 10th November 2012
View Replies!

Simple COUNT question

i'm trying to display a full and and count the number of names, per account. this is what i'm doing: SELECT v.NamePrefix + ' ' + v.FName + ' ' + v.MI + ' ' + v.LName AS AppName, COUNT(AppName) FROM whatever the error i'm getting is: Invalid column name 'AppName'. am I doing something wrong
VIEWS ON THIS POST

72

Posted on:

Saturday 10th November 2012
View Replies!

Trigger not quite working...

well I have written a trigger to check what department an item is put in, and to change a value based on the department it is in, whether the user has done it or not. Unfortunately, it doesn't quite work... Code: create trigger set_xcode on item for insert, update as declare @id int select @id = (select id from inserted) declare @a nvarchar(30) select @a = c.name from item as a, category as b, department as c where a.categoryid = b.id and a.departmentid = c.id and a.itemlookupcode like @id if @a = '%dept_name%' update item set xcode= 1 where item.id = @id
VIEWS ON THIS POST

42

Posted on:

Saturday 10th November 2012
View Replies!

command text was not set for the command object

Hi all.. i know a very limited bit of ASP however i am currently making a BASIC forum.. No fancy stuff in it. I get this error when i try and Insert some infomation into the database.. "command text was not set for the command object" Here is my section of code that is going wrong... If Request("BUTTON")="Post Text" Then '****************** connecting to the database ************************************ Set oConn = Server.CreateObject("ADODB.Connection") MdbFilePath = Server.MapPath("../db/databasename.mdb") oConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";" '************************************************* ********************************* '****************** Inserting the text from the form into the database ************ Session("email")="my e-mail address" 'this is only here as temp.. '************************************************* ******************************************** If Request.QueryString("type")="reply" and Request.QueryString("mainTopic")="general" Then sSQL = "INSERT INTO data_general (id, author, subject, message, email) VALUES (" & Request.QueryString("id") & ", '" & Session("user") & "', '" & Request("subject") & "', '" & replace(replace(Request("message"),vbcr,""),vb lf,"") & "', '" & Session("email") & "')" ElseIf Request.QueryString("type")="new" and Request.QueryString("mainTopic")="recruit" Then sSQL="SELECT MAX(id) AS max_id FROM data" set RS = oConn.execute(sSQL) 'executing the sSQL stamement var_id = RS("max_id")+1 sSQL = "INSERT INTO data_recruit (id, main, author, subject, message, email) VALUES (" & var_id & ", '" & "yes" & "', '" & Session("user") & "', '" & Request("subject") & "', '" & replace(replace(Request("message"),vbcr,""),vb lf,"") & "', '" & Session("email") & "')" End If '************************************************* ******************************************** oConn.Execute sSQL 'This is the line i get an error on.. '************************************************* ********************************* Please help me...
VIEWS ON THIS POST

132

Posted on:

Saturday 10th November 2012
View Replies!

sql, asp

Originally posted by : VIMAL BISHT (vimal_bisht@yahoo.com)dear fellows,I am developing the search on the asp first time. Now for the connection with the database i am usingmsaccess database. My problem is that if i want to display the result from the particular price column and want to take the rangesuch as 10$ to 40$ then what sql statement will be needed. e.g. SELECT * FROM TABLE_NAME WHERE PRICE (10-40)$ // THIS IS WRONG STATEMENT.Please tell me the right way
VIEWS ON THIS POST

70

Posted on:

Saturday 10th November 2012
View Replies!

Where clause not working

Hi I'm using asp and an Access database to create a combo box sourced from an Access Table to update another Access Table. The drop down data is to be controlled by a value on the page and the initial part of the code is as follows: The where statement seems to be the problem because if I replace it with a real RangeID value as below everything works fine. "WHERE RangeRef = 2; " I'm not sure if it is to do with quotes, single quotes, spaces, etc, etc, but I've tried numerous variations ang get all messages including "mismatch in criteria expression" for the version above. I'm quite new to this and would appreciate some help please.
VIEWS ON THIS POST

86

Posted on:

Sunday 11th November 2012
View Replies!

CDONTS

Originally posted by : dpshank (dpshank@livingston.net)I have a web page where someone can fill out a html form then when they click submit it takes them to a page where the record is saved to a database and an email message is sent to me to let me know someone has posted something to the database. But it only works if the memo field has no more than 50 characters in it. The code that I used for this page is from Microsoft's White Paper on CDONTS. Why will it only allow 50 characters when it is specified to be a memo fieldHope you can help. - dpshank
VIEWS ON THIS POST

31

Posted on:

Sunday 11th November 2012
View Replies!

need some SQL code, download my samplepage and find my problem.

Originally posted by : tim (timstark01@hotmail.com)I'm trying to get a list menu to display in repeat region format. I've made a sample database and sample page you can download. If you get it working "cheers!!" email me a copy.you can access the sample page here:http://miona.com/listmenus/tim
VIEWS ON THIS POST

169

Posted on:

Sunday 11th November 2012
View Replies!

INSERT Problem.

I get this error, please help. Microsoft JET Database Engine error '80040e10' No value given for one or more required parameters. [code=this is my SQL] sql="INSERT INTO [topic_" & Request.querystring("topic") & "]" sql=sql & "VALUES" sql=sql & "(message='" & request.form("reply") & "', " sql=sql & "created=1, " sql=sql & "user_id=1, " sql=sql & "message_id=1, " sql=sql & "last_edit=1, " sql=sql & "category="& Request.querystring("category") &")"[/code] [code=this is my output] INSERT INTO [topic_1]VALUES(message='hello', created=1, user_id=1, message_id=1, last_edit=1, category=1)[/code]
VIEWS ON THIS POST

30

Posted on:

Monday 12th November 2012
View Replies!

Cant add more than one word to database record

My page takes inputted text from the user and adds it to a record in the database. Only the first word is added to the field if more words are entered. The field type is nvarchar so I dont understand why it wont capture the rest of the text. My statement looks like: SQL = "Insert into Individual (AirRequest) Values('" & Request.Form("AirRequest") & "')". What am I doing wrong I just discovered it does this for all of the text inputs that my form contains. multiple word inputs are adding only the first word to the field. Am I using the wrong field type I have another page that is almost identical but it is inserting all words entered in the text boxes. I cant find a difference in the codes.
VIEWS ON THIS POST

148

Posted on:

Monday 12th November 2012
View Replies!

one more problem...

I just stumbeled over another problem i hope you can help me with Having the following tables: Dept ------- *Deptname Owes Emp ------ *Name DeptName (foreign key: Dept.DeptName) Car ------ *CarNr OutTo (foreign key: Emp.Name) Cost The outout I want is: DeptName, Liability (for now the liability is just the cars cost), Total (what the department owes + liability) not including the it dept and depts owing less than/equal to 1400 My sql query looks like the following: SELECT d.DeptName, c.Cost AS Liability, d.Owes + Liability AS Total FROM Dept d, Emp e, Car c WHERE d.DeptName = e.DeptName AND e.Name = c.OutTo AND d.DeptName 'IT' AND d.Owes >= 1400 The problem is that I get one of the deptnames listed several times, because there's more than one person borrowing a car in that dept. Do you understand the problem I'm not sure how to explain it. Any suggestions on the solution
VIEWS ON THIS POST

158

Posted on:

Monday 19th November 2012
View Replies!

onchange event

Originally posted by : Todd (tcostic@epicor.com)I have drop down box and I want to be able to select a name from that dropdown and have 4 other input boxes be populated using sql data.. i have the connection i'm just not sure how to do this using vb "onchange" event..
VIEWS ON THIS POST

36

Posted on:

Tuesday 20th November 2012
View Replies!

recordset to dataset?

Originally posted by : Rob (rdbartlett@technologist.com)I am retreiving a non-dotnet recordset from a DLL. How can I convert it to a dataset How can I convert it back
VIEWS ON THIS POST

82

Posted on:

Tuesday 20th November 2012
View Replies!

Error for Create index on Table named CURRENCY on Vista OS

Hi , In VISTA OS. I am using the MS ODBC dBase Driver for using the dBase Database files. When i try to create UNIQUE INDEX one one of dBase Table using the SQL Query through the exception. SQL Query: CREATE UNIQUE INDEX [CURRENCY] ON CURRENCY (CURRNAME) When i execuet this through the exception with State:37000 and Native error 3552. This problem happens on only Vista OS . I am using VS 2003 with MFC CDatabase class. NOTE: In the above statement if i rename table name CURRENCY to any name then works fine. My requiremement is i should not chnage table name CURRENCY. I need your help badly waiting for your suggestion reply. -Vivek
VIEWS ON THIS POST

80

Posted on:

Tuesday 20th November 2012
View Replies!

Using Contains in Select Statement

The following query: Code: SELECT * FROM ttdThesisInfo WHERE CONTAINS (Title, 'LED' ) gives me the following error: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'ttdThesisInfo' because it is not full-text indexed. Any ideas as to why
VIEWS ON THIS POST

34

Posted on:

Tuesday 20th November 2012
View Replies!

SQL SELECT troubles...

I'll be direct, below is the problem I am having. I tried to explain it as best as I can. If I missed something, please let me know. This has been trying my patiences and I have a feeling there is an easy solution, but for the life of me I can't figure it out. Description of what's what and coming from where: A = cat_a from category A Space 888-555-1234 = bname and btel from directory Golfer = cat from catefory Working code, but not in the order I am trying to output: Code: mySQL = "SELECT category.idcat, directory.idcat, cat, cat_a, bactive, bname, btel FROM category, directory WHERE bactive=-1 AND category.idcat=directory.idcat ORDER BY cat_a, bname ASC" A Art Group 888-555-1234 Architects AT Pages 888-555-1234 Advertising Barthrop 888-555-1234 Attorneys Brackett 888-555-1234 Gardener __________________________________________________ ___________________________ Working code, but only half of what I need to output Code: mySQL = "SELECT bname, btel FROM directory WHERE bactive=-1 ORDER BY bname ASC" A Space 888-555-1234 A Center 888-555-1234 A Clinic 888-555-1234 etc... to Z's __________________________________________________ ___________________________ The other half: Code: mySQL = "SELECT cat_a, cat FROM category ORDER BY cat_a" A B C etc... to Z __________________________________________________ ___________________________ What I am trying to do is combine Code: mySQL = "SELECT bname, btel FROM directory WHERE bactive=-1 ORDER BY bname ASC" Code: mySQL = "SELECT cat_a, cat FROM category ORDER BY cat_a" To output: A A Space 888-555-1234 Golfer A Center 888-555-1234 Sailor A Clinic 888-555-1234 Tennis B B Space 888-555-1234 Groomer B Center 888-555-1234 Trainer B Clinic 888-555-1234 Auto C C Space 888-555-1234 Plummer C Center 888-555-1234 Planter C Clinic 888-555-1234 Stemmer etc... to Z __________________________________________________ ___________________________ So I try this: Code: mySQL = "SELECT bname, btel, cat_a FROM directory, category WHERE bactive=-1 ORDER BY bname ASC, cat_a" I get page can not be displayed. HTTP500
VIEWS ON THIS POST

92

Posted on:

Tuesday 20th November 2012
View Replies!

Accessing MySql Databases

I'm having a few problems with accessing a MySql database in asp. Can anyone be able to help me Here's the error I'm getting: Error Type: Sun ONE ASP VBScript runtime (0x800A01A8) Object required: 'Conn' /viewoperator.asp, line 8 And here is my code: Code: I have a DNSless Connection type and I use the old style authentication. Can anyone solve this puzzle for me
VIEWS ON THIS POST

64

Posted on:

Tuesday 20th November 2012
View Replies!

Insert into syntax

Can any of you SQL gurus see a problem here It seems no matter how I change the syntax of the INSERT, I get either a syntax error or expected end of statement error. Please help this rookie. TIA Tom C PS. this is inserting into an Access DB
VIEWS ON THIS POST

135

Posted on:

Tuesday 20th November 2012
View Replies!

How to use '?' as a character NOT a wildcard in SQL using MS Access

In SQL in MS Access '' '*' '%' are all used as a wildcards. I need to be able to retrieve all messsages which contain a '' within the message. i.e. If a message contains the following characters : why I want to retrieve the message as a '' is part of the message. When I write the code : SELECT User.User, Message.Message FROM Message INNER JOIN [User] ON Message.[Message ID]=User.[Message ID] WHERE Message Like '**'; Access takes the '' as a wildcard and retrieves all the messages in the database. Is it possible to get round this and use '' as a specific character.. not a wildcard Please help
VIEWS ON THIS POST

94

Posted on:

Tuesday 20th November 2012
View Replies!

How to connect to oracle using ADO in ASP.net

Originally posted by : krishna kumar (krishna@dcons.com)pls can i connect to oracle using the same code as in ASP,or else let me know the code,thanx,Krishna
VIEWS ON THIS POST

103

Posted on:

Tuesday 20th November 2012
View Replies!

Using the IIF() statement in an UPDATE

I am trying to set an update trigger, but everytime I use the IIF() function I get an error. My statement is as follows: begin SET loan_week = iif(opp_status = 'open', 1, 0) end I am still using SQL 2000
VIEWS ON THIS POST

53

Posted on:

Tuesday 20th November 2012
View Replies!

Comparing dates in a query

I have the following query: Code: SELECT * FROM tablename WHERE (EndDate
VIEWS ON THIS POST

56

Posted on:

Tuesday 20th November 2012
View Replies!

How to get a different random number?

Originally posted by : Bob Lai (laipy966@pchome.com.tw)I have problems in getting a different random number using the randomize function or n=Int(10*rnd())+1.How can I check with a key so that the number generated each time will not duplicate itself
VIEWS ON THIS POST

71

Posted on:

Tuesday 20th November 2012
View Replies!

Filter Question?

Can I change this to filter a string that has multiple comma separated values (ie: Name1, Name2, Name3) It works fine for a single value string, but won't filter correctly for multiples. Code: if ([Recordset].FilterCriteria == "") { [Recordset].Action = "Filter(\"" + [Filter String] + "\")" }
VIEWS ON THIS POST

28

Posted on:

Monday 26th November 2012
View Replies!

about datagrid.columns.headertext(had source code)

Originally posted by : GuoYong (chenggy@163.net)Source codeDim strsql As Stringstrsql = System.Configuration.ConfigurationSettings.AppSett ings("server")Dim cn As New OleDbConnection(strsql)cn.Open()strsql = "select cu_cust_code,cu_eng_name,cu_chn_name from e_customer where cu_center_code='" & DDL2.SelectedItem.Value & "'"Dim ap As New OleDbDataAdapter(strsql, cn)Dim ds As New DataSet()ap.Fill(ds, "e_customer")DataGrid1.DataSource = ds.Tables(0).DefaultViewDataGrid1.ShowHeader = TrueDataGrid1.owPaging = TrueDataGrid1.PageSize = 61 DataGrid1.Columns(0).HeaderText = "Cust. Code"2 DataGrid1.Columns(1).HeaderText = "English Name"3 DataGrid1.Columns(2).HeaderText = "Chinese Name"DataGrid1.DataBind()System error messageline 1 errorindex out of rangeSystem.ArgumentOutOfRangeExceptionwhyhelp me please
VIEWS ON THIS POST

77

Posted on:

Monday 26th November 2012
View Replies!