RE: SQL question

2000-10-30 Thread Gary Davidson
Setting varchar this large can adversely affect performance. Use text instead. -Original Message- From: Chris Williams [mailto:[EMAIL PROTECTED]] Sent: Monday, October 30, 2000 4:26 PM To: CF-Talk Subject: RE: SQL question Varchar can go to 8096. -Original Message- From: Peter

RE: SQL question

2000-10-30 Thread Chris Williams
Varchar can go to 8096. -Original Message- From: Peter Theobald [mailto:[EMAIL PROTECTED]] Sent: Monday, October 30, 2000 12:46 PM To: CF-Talk Subject: RE: SQL question The limit of a 'text' data field is something like 2 Gigabytes, although many drivers will cut it off at

RE: SQL question

2000-10-30 Thread Peter Theobald
s without errors. > >~Simon > >-Original Message- >From: Corina S. Moore [mailto:[EMAIL PROTECTED]] >Sent: Monday, October 30, 2000 2:52 PM >To: CF-Talk >Subject: Re: SQL question > > >I'm positive it was truncated. I pulled the data directly out of SQL

RE: SQL question

2000-10-30 Thread Simon Horwith
fields without errors. ~Simon -Original Message- From: Corina S. Moore [mailto:[EMAIL PROTECTED]] Sent: Monday, October 30, 2000 2:52 PM To: CF-Talk Subject: Re: SQL question I'm positive it was truncated. I pulled the data directly out of SQL and over half of it is missing. - Original

RE: SQL question

2000-10-30 Thread Doug Powell
You can change it to nvarchar and set the length at what you want -Original Message- From: Corina S. Moore [mailto:[EMAIL PROTECTED]] Sent: Monday, October 30, 2000 2:42 PM To: CF-Talk Subject: OT: SQL question Hi List, I am Learning SQL by trial and error. So far so good -- Unt

Re: SQL question

2000-10-30 Thread Corina S. Moore
I'm positive it was truncated. I pulled the data directly out of SQL and over half of it is missing. - Original Message - From: "Simon Horwith" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, October 30, 2000 2:47 PM Subject:

RE: SQL question

2000-10-30 Thread Simon Horwith
are you sure the value was truncated in the database, or might it be that it's being truncated by Query Analyzer or Studio Query Builder, or whatever youre using to view the data? Just checking... I've had that happen to me, but have never had actual data loss before. ~Simon -Original Messa

Re: SQL Question

2000-10-10 Thread Chris Terrebonne
This will do it: SELECT FirstName, LastName FROM RealtorInfo WHERE RealtorID IN (SELECT RealtorID FROM Homes WHERE HomeID IN(#homelist#)) Chris -- Original Message From: ""<[EMAIL PROTECTED] (paul smith)> Subject: Re: SQL Question D

RE: SQL Question

2000-10-10 Thread Ryan Williams
Easy solution :-) SELECT ID FROM Homes WHERE HomeID IN(#homelist#) Then convert the query to a list. I forget the function for this. Then run you 2nd query like so: SELECT FirstName, LastName FROM RealtorInfo WHERE RealtorID in This should do the trick, or if I am

RE: SQL Question

2000-10-10 Thread Bob Silverberg
Sounds like you need a subselect. Try this: SELECT FirstName, LastName FROM RealtorInfo WHERE RealtorID IN ( SELECT DISTINCT RealtorID FROM Homes HERE HomeID IN(#homelist#) ) Bob -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 1

RE: SQL Question

2000-10-10 Thread Larry Juncker
If your realtorID is one of the fields that is in your HOMES table and your homes query was named getHomesInfo, then you would say: SELECT FirstName, LastName FROM RealtorInfo WHERE RealtorID = #getHomesInfo.RealtorID# Larry Juncker Senior Cold Fusion Programmer Heartland Communications Group, I

Re: SQL Question

2000-10-10 Thread paul smith
best, paul At 12:47 PM 10/10/00 -0500, you wrote: >I have a list of ID's and I want to query based on those ID's so I have >SELECT * >FROM Homes >WHERE HomeID IN(#homelist#) > >Now here is the question I want to run a query that pull info from another >table based on the results of that quer

RE: SQL Question

2000-10-10 Thread Hayes, David
Well, if you want one query, use something like: SELECT FirstName, LastName FROM RealtorInfo WHERE RealtorID in (SELECT RealtorID FROM Homes WHERE HomeID IN (#homelist#)) -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, Oc

Re: SQL question

2000-10-08 Thread Chris Lott
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A summary to help others. My question was, given a table like this: > userid, course > john ethics > john english > mary english > mary math > mary bio How to get the user that has taken the most courses and another query to see

RE: SQL question

2000-10-06 Thread Warrick, Mark
Yes, first of all, put the courses in a different table. Then setup a linking table between the people table and the courses table. Then you can run counts on the linking table and join in data from the other tables as required. ---mark

RE: SQL question

2000-10-06 Thread Hayes, David
Try this: select top 1 userID, count(course) from group by userid order by 2 desc select top 1 course, count(userid) from group by course order by 2 desc -Original Message- From: Chris Lott [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 05, 2000 8:03 PM To: CF-Talk Subject: SOT

RE: sql question

2000-09-28 Thread Chapman, Katrina
You can't do it without one other row that has a UNIQUE identifier. --K > -Original Message- > From: Gavin Myers [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 27, 2000 11:59 AM > To: CF-Talk > Subject: ot: sql question > > > here's what i'm doing > > delete from class_regist

Re: sql question

2000-09-28 Thread jeffc
I have to wonder why the same Users_ID would be registered for the same class 4 times(a very large person needing 4 seats??) That aside. Add an Identity field for the table. class_registration_ID. Then delete from class_registration where class_registration_ID = theIDnumber - Original Messag

RE: SQL Question (sorta OT)

2000-08-12 Thread Philip Arnold - ASP
> > I would like to add "omit <> 'yes' " to the WHERE clause. When I > > do this, the > > query returns 0 records (unmodified, it returns 25 records). > AND NOT omit = 'yes' In addition to Kevin's comments, some flavors of SQL (especially SQL Server) treat NULL differently - so "NOT omit='Yes'" w

Re: SQL Question (sorta OT)

2000-08-11 Thread Kevin Marshall
John, You should be able to say: AND NOT omit = 'yes' That's assuming that omit is a text field and not a boolean (yes/no) field. If its boolean you could just say: AND omit = false hth, Kevin At 01:33 PM 8/11/00 -0700, you wrote: >Hi all > >Here the query I'm trying to edit: > > > SELEC

RE: SQL Question

2000-08-04 Thread Sean Daniels
> How do I set the default current date in SQL 7 The function getdate() will return the current date/time in SQL 7. If you want a field that is set to the current date/time when a record is inserted, add a datetime field to the database and set the default value to getdate(). - Sean ~~

Re: SQL Question: Select a list of most recent records from a table that stores User Histories,for ALL users.

2000-07-07 Thread LW
Hi, Not sure if following will help: using a select distinct and order by EffectiveDate DESC clause with your table Regards wai leng - Original Message - From: Angél Stewart <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 08, 2000 2:18 AM Subject: SQL Question: Select

RE: SQL Question: Select a list of most recent records from a table that stores User Histories,for ALL users.

2000-07-07 Thread mherbene
select e1.* fromemployee_info e1 where e1.deptno = #deptno" and e1.eff_date = (select max(e2.eff_date) fromemployee_info e2 where e2.empno = e1.empno) i think... -Original Mes

RE: SQL Question: Select a list of most recent records from a table that stores User Histories,for ALL users.

2000-07-07 Thread Dan Haley
Two ideas . . . you might want to compare to check for speed differences, or hold out for a better answer . . . One: select emp_id, emp_name, dept_id, max(effective_date) effective_date from employees group by emp_id, emp_name, dept_id Depending on the size of the table and the way it is design

Re: SQL question - selecting dates for a specific month

2000-05-08 Thread Fernando Segalla
Try: select sum(time) as sumtime from timesheets where employee_id = #Client.employee_id# and submitted = 1 and date = #getfor# Segalla - Original Message - From: James Mathieson <[EMAIL PROTECTED]> To: Cf-Talk Mailing List (E-mail) <[EMAIL PROTECTED]> Sent: Monday, May 08, 2000 5:20 P

Re: SQL Question?

2000-04-29 Thread Josh Black
If you're using MS SQL Server (I'm not sure how many other dbs support this) you can use the TOP keyword to specify how many records to return. In your case, it would be: Select TOP 3 SUM(Quantity) AS TopBooks, BookID >From OrderItems GROUP BY BookID ORDER BY TopBooks DESC The TOP keyword also

Re: SQL Question?

2000-04-29 Thread Bud
On 4/29/00, Brian Ingram penned: >Query: > >Select SUM(Quantity) AS TopBooks, BookID >From OrderItems >GROUPBY BookID >ORDER BY TopBooks DESC > > >Here is what i get when i run this query(show below). All I want is >the top 3 books returned. How can i do this with SQL? > >TopBooks BookID

RE: SQL question

2000-03-28 Thread Jordon Saardchit
Ii'm not 100% sure of what it is you are trying to do. Are you looking to pull all the information in 'tblData' that corresponds to the uid in tblSomeInfo If so, you do this. SELECT d.* FROM tblSomeInfo s, tblData d WHERE s.uid = [whichever uid you are looking for] AND s.uid = d.uid That

<    1   2   3   4   5   6