RE: SQL HELP!

2004-05-20 Thread Pascal Peters
Maybe too late, but you can. It's a holiday in Belgium, so I don't read my mail as often as on a work day. Pascal > -Original Message- > From: brobborb [mailto:[EMAIL PROTECTED] > Sent: donderdag 20 mei 2004 11:24 > To: CF-Talk > Subject: Re: SQL HELP! > &

RE: SQL HELP!

2004-05-20 Thread Philip Arnold
> From: brobborb > > Now I want to return all the rows in the STUFF table, but to > replace the last 3 fields with names in the PERSONS table.   > THe fields first_person_id, second_person_id, and > third_person_id links to the person_id field in the table > PERSONS. A good book to have on your

Re: SQL HELP!

2004-05-20 Thread brobborb
hey peter may i contact you off the list quick?   - Original Message -   From: Pascal Peters   To: CF-Talk   Sent: Thursday, May 20, 2004 4:22 AM   Subject: RE: SQL HELP!   Just add it after the FROM clause. Also keep in mind that if you use   all * in the SELECT clause, you won'

RE: SQL HELP!

2004-05-20 Thread Pascal Peters
JOIN persons AS person3 ON stuff.third_person_id = persons.person_id WHERE ... (your where clause here) > -Original Message- > From: brobborb [mailto:[EMAIL PROTECTED] > Sent: donderdag 20 mei 2004 9:07 > To: CF-Talk > Subject: Re: SQL HELP! > > What if I wanted to add

Re: SQL HELP!

2004-05-20 Thread brobborb
What if I wanted to add a WHERE clause?   - Original Message -   From: Matthew Walker   To: CF-Talk   Sent: Thursday, May 20, 2004 1:28 AM   Subject: RE: SQL HELP!   SELECT stuff.*, person1.*, person2.*, person3.*   FROM  (   (   stuff LEFT JOIN persons AS person1 ON

RE: SQL HELP!

2004-05-19 Thread Matthew Walker
)   _   From: brobborb [mailto:[EMAIL PROTECTED] Sent: Thursday, 20 May 2004 5:55 p.m. To: CF-Talk Subject: SQL HELP! hey guys, i have a table named Stuff.  this table has the fields stuff_id, stuff_title, first_person_id, second_person_id, and third_person_id. The those last 3 fields refer

SQL HELP!

2004-05-19 Thread brobborb
hey guys, i have a table named Stuff.  this table has the fields stuff_id, stuff_title, first_person_id, second_person_id, and third_person_id. The those last 3 fields refer to a table called "persons", and contains the person_id.  The table PERSONS contain the fields person_id, first_name, and la

RE: SQL Help...

2004-05-11 Thread Philip Arnold
> From: Jeff Waris > > I guess I am having an off day with SQL. I think technically > this should work but I get a syntax error >   > UPDATE Account a >   > SET a.last_update = (SELECT TOP 1 h.tranDate >   >  FROM History h >   >  WHERE a.Account_Number = h

RE: SQL Help...

2004-05-11 Thread Jeff Waris
Nick, worked like a charm, the only thing I had to do was get rid of all the aliasing.. For whatever reason Query analyzer was throwing a fit with the aliases. Ben, Aliasing on tables can be set like that. :) I think your thinking of column aliases. Thanks all, Jeff [Todays Threads]

Re: SQL Help...

2004-05-11 Thread Stephen Moretti
Ben, > Without thinking about it too hard (which means this may or may not be > the real issue) it looks like you're missing a couple of 'as' clauses: > > update account as a ... from history as h ... > Unfortunately, AS is a voluntary addition to SQL statements. I would love to see them made com

Re: SQL Help...

2004-05-11 Thread Ben Doom
Without thinking about it too hard (which means this may or may not be the real issue) it looks like you're missing a couple of 'as' clauses: update account as a ... from history as h ... --Ben Doom Jeff Waris wrote: > I guess I am having an off day with SQL. I think technically this should >

Re: SQL Help...

2004-05-11 Thread Nick de Voil
Jeff > I guess I am having an off day with SQL. I think technically this should > work but I get a syntax error > > UPDATE Account a > > SET a.last_update = (SELECT TOP 1 h.tranDate > >  FROM History h > >  WHERE a.Account_Number = h.Account_Number > >  

SQL Help...

2004-05-11 Thread Jeff Waris
I guess I am having an off day with SQL. I think technically this should work but I get a syntax error UPDATE Account a SET a.last_update = (SELECT TOP 1 h.tranDate  FROM History h  WHERE a.Account_Number = h.Account_Number

Re: Need sql help

2004-03-15 Thread Deanna Schneider
Al, That query isn't really doing what you originally asked. It won't return doctors with no trials. You'll need an outer join for that. - Original Message - From: "Al Musella, DPM" > Worked perfectly! Thanks! > > Al > > > > >SELECT    c.name, MIN(dateupdated) as oldest_trial > >FROM   

RE: Need sql help

2004-03-13 Thread Al Musella, DPM
BY  c.name > >Just a whack at it. :-) > >Greg > >-Original Message- >From: Al Musella, DPM [mailto:[EMAIL PROTECTED] >Sent: Friday, March 12, 2004 3:09 PM >To: CF-Talk >Subject: Need sql help > >My brain is fried... this should be easy: >3 tables:

RE: Need sql help

2004-03-12 Thread Greg Luce
[mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 3:09 PM To: CF-Talk Subject: Need sql help My brain is fried... this should be easy: 3 tables: Contacts:  name and contactID  (one entry for each doctor) Trials: Has List of clinical trials.  TrialID, DateUpdated  (each trial can have multiple

Re: Need sql help

2004-03-12 Thread Christopher Farino
  Subject: Need sql help   My brain is fried... this should be easy:   3 tables:   Contacts:  name and contactID  (one entry for each doctor)   Trials: Has List of clinical trials.  TrialID, DateUpdated  (each trial can   have multiple doctors, each doctor can have multiple trials)   ContactDetails

Need sql help

2004-03-12 Thread Al Musella, DPM
My brain is fried... this should be easy: 3 tables: Contacts:  name and contactID  (one entry for each doctor) Trials: Has List of clinical trials.  TrialID, DateUpdated  (each trial can have multiple doctors, each doctor can have multiple trials) ContactDetails: ContactID, Trial ID  (for many to

RE: SQL Help

2004-03-12 Thread Bruce, Rodney S HQISEC/Veridian IT Services
Jochem with minor changes, I got the query to work. Thanks everyone for the suggections and help Rodney -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 4:21 PM To: CF-Talk Subject: Re: SQL Help Bruce, Rodney S HQISEC/Veridian

Re: SQL Help

2004-03-10 Thread Jochem van Dieten
Bruce, Rodney S HQISEC/Veridian IT Services wrote: >   > Getting this error msg:  with USING > Server: Msg 155, Level 15, State 1, Procedure sp_ProjectStatusReport, Line > 58 > 'Proj_id' is not a recognized OPTIMIZER LOCK HINTS option. >   > With this query,  using MS SQL 2000 > > SELECT PROJ_NAME

RE: SQL Help

2004-03-10 Thread Bruce, Rodney S HQISEC/Veridian IT Services
I am doing all of this in the Query Analyzer, trying to create a stored procedure. Any ideas Thanks Rodney -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 9:03 AM To: CF-Talk Subject: RE: SQL Help Bruce, Rodney S HQISEC/Veridian IT

RE: SQL Help

2004-03-10 Thread Bruce, Rodney S HQISEC/Veridian IT Services
: Wednesday, March 10, 2004 9:03 AM To: CF-Talk Subject: RE: SQL Help Bruce, Rodney S HQISEC/Veridian IT Services wrote: > > your suggested query below returns 0 records, becuase the field will > never contain all three at the same time in the same record. That is not the test being done. &g

RE: SQL Help

2004-03-10 Thread Jochem van Dieten
Bruce, Rodney S HQISEC/Veridian IT Services wrote: > > your suggested query below returns 0 records, becuase the field will > never contain all three at the same time in the same record. That is not the test being done. > UID  Name Description   Parent Proj_ID > 1 

RE: SQL Help

2004-03-10 Thread Bruce, Rodney S HQISEC/Veridian IT Services
    -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:32 AM To: CF-Talk Subject: RE: SQL Help Ian Skinner said: > My first suggestion would be an embed sub-query. That would work if you add another level for the "Govt&qu

RE: SQL Help

2004-03-09 Thread Jochem van Dieten
Ian Skinner said: > My first suggestion would be an embed sub-query. That would work if you add another level for the "Govt" condition. > SELECT > fields > > FROM > Table. > (    SELECT > fields > > FROM > TABLE > > WHERE > Name LIKE

RE: SQL Help

2004-03-09 Thread Mark A. Kruger - CFG
12:07 PM   To: CF-Talk   Subject: RE: SQL Help   Need to play around with this for awhile and see what I get.   For some reason thought I tried NOT LIKE, but dont remember now ;o\   Agreed this is not a very good way to handle this. I did not designed the DB   nor can I change it.   Have to work

RE: SQL Help

2004-03-09 Thread Bruce, Rodney S HQISEC/Veridian IT Services
. Thanks for all the help from everyone. -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 10:08 AM To: CF-Talk Subject: RE: SQL Help My first suggestion would be an embed sub-query. SELECT     fields FROM     Table.     (    SELECT

RE: SQL Help

2004-03-09 Thread Bruce, Rodney S HQISEC/Veridian IT Services
- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 10:12 AM To: CF-Talk Subject: RE: SQL Help How about: WHERE  (name LIKE '%Open%'  or name LIKE '%Engineering%') AND name NOT LIKE ('%closed%') Personally, this is probably not the best w

RE: SQL Help

2004-03-09 Thread Bruce, Rodney S HQISEC/Veridian IT Services
Jeff thanks for info and the forward -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 9:47 AM To: CF-Talk Subject: Re: SQL Help Hi Rodney, I'm not really able to help all that much, but what I suggest is trying the SQL mailing list. I re

RE: SQL Help

2004-03-09 Thread Ciliotta, Mario
PROTECTED] Sent: Tuesday, March 09, 2004 12:12 PM To: CF-Talk Subject: RE: SQL Help How about: WHERE  (name LIKE '%Open%'  or name LIKE '%Engineering%') AND name NOT LIKE ('%closed%') Personally, this is probably not the best way to handle status.  I always have a

RE: SQL Help

2004-03-09 Thread Ian Skinner
My first suggestion would be an embed sub-query. SELECT     fields FROM     Table.     (    SELECT fields FROM TABLE WHERE Name LIKE "%Engineering%"     ) AS FooBar WHERE    FooBar.ID = Table.ID AND    Name LIKE "%Open%

RE: SQL Help

2004-03-09 Thread Mark A. Kruger - CFG
pen','closed','pending') and always be assured of a proper status. -Mark gets me projects that are closed as well as open -Original Message- From: Bruce, Rodney S HQISEC/Veridian IT Services [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 10:41 AM To: CF-T

Re: SQL Help

2004-03-09 Thread Jeff Small
ponse from it. Have at it, "SQL people". - Original Message - From: "Bruce, Rodney S HQISEC/Veridian IT Services" To: "CF-Talk" <[EMAIL PROTECTED]> Subject: SQL Help > Hi all > > I need some help with a query that supplies a report. > &

SQL Help

2004-03-09 Thread Bruce, Rodney S HQISEC/Veridian IT Services
Hi all I need some help with a query that supplies a report. The issue for me is one of the tables: (simplified) Table UID   Name Description  Parent  Project_id This table contains different information in the same field (name),like the projects status (Initializing, Engineering, etc

RE: OT: SQL HELP

2004-02-18 Thread Tim Do
yes.. permissions are there. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 4:40 PM To: CF-Talk Subject: Re: OT: SQL HELP The ID your using have permissions on the table?   _ [Todays Threads] [This Message] [Subscription

Re: OT: SQL HELP

2004-02-18 Thread Casey C Cook
The ID your using have permissions on the table? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

OT: SQL HELP

2004-02-18 Thread Tim Do
Hello All, I'm trying to query a table that is on a different server.  So I did something like this:   select * from server.database.dbo.tablename Strange thing is that this works on every table in that database except for one.  Everytime I try to query from that table, I get this error:

RE: SQL Help (updated)

2004-02-01 Thread Stephen Hait
> Had some incorrect info in there Carry on  :-) > > Given the following journals with related documents. > > Journal A > > document1a - Jan 1, 2004 > document2a - Jan 2, 2003 > document3a - Dec 3, 2002 > > Journal B > > document1b - Jan 3, 2001 > document2b - Jan 4, 2000 > document3b

RE: SQL Help (updated)

2004-01-30 Thread Tangorre, Michael
Had some incorrect info in there Carry on  :-) Given the following journals with related documents. Journal A document1a - Jan 1, 2004 document2a - Jan 2, 2003 document3a - Dec 3, 2002 Journal B document1b - Jan 3, 2001 document2b - Jan 4, 2000 document3b - Dec 2, 1999 Journal C docu

SOT: SQL Help

2004-01-30 Thread Tangorre, Michael
I am trying to do the following: Let's say I have two tables: Journal and Document. A journal can have zero-many documents associated with it, each holding its own date/time field. Each journal also holds it own date date/time field. I am trying to write a query that will give me the TOP 10 journal

RE: SQL Help

2003-12-16 Thread Cantrell, Adam
(now())# Where IssueNumber = value="#form.issuenumber#"> If that wasn't the issue, you should use it anyway :) -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 10:54 AM To: CF-Talk Subject: SQL Help Hello All, I

SQL Help

2003-12-16 Thread Mickael
Hello All, I am having problems with an update statement that used to work fine in Access with CFMX.  I have an issue tracking app that used to have the issue numbers stored as TEXT, I converted the column to Number a little while ago and it worked fine.  Recently users have been having problems u

Re: SQL Help on Join

2003-12-01 Thread Deanna Schneider
Yes, that's true. But, sub-queries are there for a reason - you can use them when you need to. - Original Message - From: "Mickael" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, December 01, 2003 2:07 PM Subject: Re: SQL Help on

Re: SQL Help on Join

2003-12-01 Thread Mickael
Hi Deanna I guess I would have to do a sub-query  I always heard that a sub-query was not very efficient and that doing a join was always better. Mike   - Original Message -   From: Deanna Schneider   To: CF-Talk   Sent: Monday, December 01, 2003 1:51 PM   Subject: Re: SQL Help on

Re: SQL Help on Join

2003-12-01 Thread Deanna Schneider
t; Sent: Monday, December 01, 2003 12:37 PM Subject: Re: SQL Help on Join > Mickael writes: > > Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal) as SumCurBal, Sum(Pmt_amt) as SUMPmtamt > > from Client_debt > > Left outer join Client_pmt on client_d

RE: SQL Help on Join

2003-12-01 Thread cf-talk
Typically you don't count * But you would do it this way... count(tablename.*) -Novak -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 10:18 AM To: CF-Talk Subject: Re: SQL Help on Join how do I specify the tablename with the

Re: SQL Help on Join

2003-12-01 Thread Mickael
Hey Scott, I am still getting the two records for an account, if there are the records in the client_pmt table,  How does distinct work?   - Original Message -   From: Scott Weikert   To: CF-Talk   Sent: Monday, December 01, 2003 1:37 PM   Subject: Re: SQL Help on Join   Mickael

Re: SQL Help on Join

2003-12-01 Thread Mickael
how do I specify the tablename with the Count(*)?   - Original Message -   From: Scott Weikert   To: CF-Talk   Sent: Monday, December 01, 2003 1:37 PM   Subject: Re: SQL Help on Join   Mickael writes:   > Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal)

Re: SQL Help on Join

2003-12-01 Thread Scott Weikert
Mickael writes: > Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal) as SumCurBal, Sum(Pmt_amt) as SUMPmtamt > from Client_debt > Left outer join Client_pmt on client_debt.debt_id = client_pmt.debt_id You're specifying the table names of the fields in your JOIN but not in

SQL Help on Join

2003-12-01 Thread Mickael
Hello All, I am not getting the results that I am looking for may query. Here is my sql Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal) as SumCurBal, Sum(Pmt_amt) as SUMPmtamt from Client_debt Left outer join Client_pmt on client_debt.debt_id = client_pmt.debt_id Th

RE: SQL Help

2003-11-24 Thread Michael Traher
CTED] Sent: 21 November 2003 17:56 To: CF-Talk Subject: Re: SQL Help Hi Michael, Thanks for the response.  Please excuse me if this is obvious as I don't see it.  How would I extract on the numbers I need using the below.  If I have 20 area codes would I need to make the first in (then the

Re: SQL Help

2003-11-21 Thread Mickael
ginal Message -   From: Michael Traher   To: CF-Talk   Sent: Friday, November 21, 2003 12:44 PM   Subject: RE: SQL Help   (Left(phone_list,3) in ('212','213')  OR phone_list like '%,212%' OR   phone_list like '%,213%')   but I would predict poor perfo

RE: SQL Help

2003-11-21 Thread Michael Traher
ED] Sent: 21 November 2003 17:23 To: CF-Talk Subject: SQL Help Hello All, I have a memo field in SYBASE that contains phone numbers delimited by a comma. I need to qualify telephone numbers that are in a group of area codes, using SQL only I can't use CF. The is called phone_list and

SQL Help

2003-11-21 Thread Mickael
Hello All, I have a memo field in SYBASE that contains phone numbers delimited by a comma. I need to qualify telephone numbers that are in a group of area codes, using SQL only I can't use CF. The is called phone_list and the values look like this "2125551212,213555-1212,2145551212" How could I

RE: SQL Help

2003-10-22 Thread Tony Weeg
r. tw -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 1:23 AM To: CF-Talk Subject: RE: SQL Help select (convert(varchar (255),m_month) + '/' + convert(varchar (255),m_day)) + '/' +  convert(varchar (255),m_year)) as date from myTable

RE: SQL Help

2003-10-22 Thread Tony Weeg
TENATOR" :) hth tw -Original Message- From: Cedric Villat [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:48 AM To: CF-Talk Subject: SQL Help I have a database where the day, month, and year are stored as ints. When I select these 3 columns, I want to make them

Re: SQL Help

2003-10-22 Thread Donnie Bachan
What DB are you using? MySQL has STR_TO_DATE(str,format) which returns a date time value. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

SQL Help

2003-10-22 Thread Cedric Villat
I have a database where the day, month, and year are stored as ints. When I select these 3 columns, I want to make them into a date. Something along these lines: SELECT (m_day, m_month, m_year) AS m_date FROM myTable Obviously that doesn't work, but is there a way to concatenate the 3 ints to cre

RE: SQL Help - Correct Post

2003-10-09 Thread Mark A. Kruger - CFG
  >Allan   >       >>What is your question?       >>-Original Message-----       >>From: Allan Clarke [mailto:[EMAIL PROTECTED]       >>Sent: donderdag 9 oktober 2003 13:32       >>To: CF-Talk       >>Subject: SQL Help - Correc

RE: SQL Help - Correct Post

2003-10-09 Thread Mark A. Kruger - CFG
: donderdag 9 oktober 2003 13:32   >To: CF-Talk   >Subject: SQL Help - Correct Post   >   >   >   >  action="">   >   >   >file="C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log"   >  variable="fOutput">   >   >   &

Re: SQL Help - Correct Post

2003-10-09 Thread Jochem van Dieten
Allan Clarke wrote: > > Date/Time Keyword Category   Results Returned > Status UserName You probably have a long line of dashes or equals signs that is stripped as a signature delimiter. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: SQL Help - Correct Post

2003-10-09 Thread Pascal Peters
What is your question? -Original Message- From: Allan Clarke [mailto:[EMAIL PROTECTED] Sent: donderdag 9 oktober 2003 13:32 To: CF-Talk Subject: SQL Help - Correct Post   action=""> file="C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log"   variable="fO

SQL Help - Correct Post

2003-10-09 Thread Allan Clarke
  action=""> file="C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log"   variable="fOutput"> QueryNew("DateTime,UserName,SearchString,IndexName,ResultsFound,Status")> delimiters="#Chr(10)#">      tmp = QueryAddRow(qTmp,1);   tmp=QuerySetCell(qTmp,"DateTime", Replace(listGetAt(fileLine,1),"

SQL Help - Correct Post

2003-10-09 Thread Allan Clarke
  action=""> file="C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log"   variable="fOutput"> QueryNew("DateTime,UserName,SearchString,IndexName,ResultsFound,Status")> delimiters="#Chr(10)#">      tmp = QueryAddRow(qTmp,1);   tmp=QuerySetCell(qTmp,"DateTime", Replace(listGetAt(fileLine,1),"

SQL Help

2003-10-09 Thread Allan Clarke
  action=""> file="C:\Inetpub\wwwroot\logReport\dtSearchWeb2003-09.log"   variable="fOutput"> QueryNew("DateTime,UserName,SearchString,IndexName,ResultsFound,Status")> delimiters="#Chr(10)#">      tmp = QueryAddRow(qTmp,1);   tmp=QuerySetCell(qTmp,"DateTime", Replace(listGetAt(fileLine,1),"

Re: Repost: SQL Help

2003-09-12 Thread Patricia G. L. Hall
> For arguments sake, say you have 1 record for a patient, and 3 > X-ray records for that patient because there are 3 X-ray photo's. > Which X-ray record do you want to send to the third party? A > random one, the last one? Or do you just want to send a boolean > indicating there is a number of X-r

Re: Repost: SQL Help

2003-09-12 Thread Jochem van Dieten
Patricia G.L.Hall wrote: > > A patient's records are stored throughout many tables in the db. For > the most part it is one row per patient record. Sometimes, in some > tables, there can be multiple records per patient record. > > I have to flatten the patient record into a text file. The fo

Re: Repost: SQL Help

2003-09-12 Thread Patricia G. L. Hall
> From: "Patricia G. L. Hall" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, September 11, 2003 5:20 PM > Subject: Re: Repost: SQL Help > > >> > You should be able to just do a MAX() around the Gift field (if I understan

Re: Repost: SQL Help

2003-09-12 Thread Deanna Schneider
ureid - Original Message - From: "Patricia G. L. Hall" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, September 11, 2003 5:20 PM Subject: Re: Repost: SQL Help > > You should be able to just do a MAX() around the Gift field (if I &g

Re: Repost: SQL Help

2003-09-11 Thread Patricia G . L . Hall
> Maybe you should try to explain in words what you are trying to > achieve, because I am getting the impression that the code is > much more complicated then what is actually needed. > I'll try. I warn you, I'll likely end up muddying the issue. A patient's records are stored throughout many ta

Re: Repost: SQL Help

2003-09-11 Thread Jochem van Dieten
Patricia G.L.Hall wrote: > > I tried to implement this 3 ways. 2 gave me errors (cause they're > wrong) and 1 didn't give me the results I needed. Referring back to > the shorter query I started out with: Maybe you should try to explain in words what you are trying to achieve, because I am g

Re: Repost: SQL Help

2003-09-11 Thread Patricia G . L . Hall
On Thursday, September 11, 2003, at 06:24 PM, Ian Skinner wrote: > your group by is on the wrong query. you need it on the sub-query > where the > max is at. > > Case > ( >Select MAX count(etp.etprocedureid) >from eTransferProtocolLink etp >Where etp.etProcedure

RE: Repost: SQL Help

2003-09-11 Thread Ian Skinner
etp.etprocedureid ) -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA -Original Message- From: Patricia G. L. Hall [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 3:21 PM To: CF-Talk Subject: Re: Repost: SQL Help > You should be able to just

Re: Repost: SQL Help

2003-09-11 Thread Patricia G . L . Hall
> You should be able to just do a MAX() around the Gift field (if I > understand your intentions correctly, you need them around some > other CASE statements as well) and add group by statements as needed. > > I tried to implement this 3 ways. 2 gave me errors (cause they're wrong) and 1 didn't g

Re: Repost: SQL Help

2003-09-11 Thread Jochem van Dieten
Patricia G. L. Hall wrote: > > Select > 'False' as FSHUnknown, > 'False' as E2Unknown, > '' as ptGnRHaFlare, > '' as PtGnRHaSupp, > ci.caseid as clinicCycleID, > Case count(stim.stimulationid) > When Then 1 > Else 0 > End as PtUnstimulated, > stim.labNormalFSHLevel

Re: Repost: SQL Help

2003-09-11 Thread Patricia G. L. Hall
Sure. > It would be easier if you showed the real query. Select 'False' as FSHUnknown, 'False' as E2Unknown, '' as ptGnRHaFlare, '' as PtGnRHaSupp, ci.caseid as clinicCycleID, Case count(stim.stimulationid) When Then 1 Else 0 End as PtUnstimulated, stim.labN

Re: Repost: SQL Help

2003-09-11 Thread Jochem van Dieten
Patricia G. L. Hall wrote: > > Select > Case > ( > Select count(etp.etprocedureid) > from eTransferProtocolLink etp > Where etp.etProcedureid = et.etProcedureid and > etp.protocolid = 12 > ) > When 0 then 0 > When null then 0 > Else 1 > End as GIFT

Repost: SQL Help

2003-09-11 Thread Patricia G. L. Hall
Pardon the previous post. I was not finished with my draft. I've written this query (extremely simplified): Select Case ( Select count(etp.etprocedureid) from eTransferProtocolLink etp Where etp.etProcedureid = et.etProcedureid and etp.protocolid = 12 ) When

Re: OT: SQL help

2003-08-27 Thread Jochem van Dieten
Mark A. Kruger - CFG wrote: > What?? what about cursors? This seems pretty easy in SQL if you ask me. I should have been more specific. You can't do it in SQL in MS SQL Server. You need to use some non-standard T-SQL facilities. Jochem ~~~

RE: OT: SQL help

2003-08-26 Thread Mark A. Kruger - CFG
What?? what about cursors? This seems pretty easy in SQL if you ask me. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 4:08 PM To: CF-Talk Subject: Re: OT: SQL help Michael Hodgdon wrote: > > Before I begin, I know this is simp

OT: SQL help

2003-08-26 Thread Michael Hodgdon
I am sure this is really easy, but for some reason, I cannot get a handle on this. Before I begin, I know this is simple and remedial in CF, but I specifically want a SQL solution (if necessary, it can be a Transact SQL solution) Basically, I want to loop over a query using SQL syntax just like

RE: SQL help

2003-08-26 Thread Dave Watts
> I am sure this is really easy, but for some reason, I cannot > get a handle on this. > > Before I begin, I know this is simple and remedial in CF, but > I specifically want a SQL solution (if necessary, it can be a > Transact SQL solution) > > Basically, I want to loop over a query using S

Re: OT: SQL help

2003-08-26 Thread Jochem van Dieten
Michael Hodgdon wrote: > > Before I begin, I know this is simple and remedial in CF, but I specifically > want a SQL solution (if necessary, it can be a Transact SQL solution) > > Basically, I want to loop over a query using SQL syntax just like you would > loop over a query using or tags. Tha

Re: sql help

2003-08-14 Thread Jamie Jackson
Well, you escape a single quote with an extra single quote, so you could give this a shot: SELECT textCol FROM myTable WHERE textCol like '%''%' Jamie On Fri, 8 Aug 2003 11:04:56 -0400, in cf-talk you wrote: >i would like to write a sql query that finds everywhere an ' occurs in a >field (ie. '

RE: sql help, easy one

2003-08-14 Thread Mark A. Kruger - CFG
outlined pretty well in SQL books online under "alter table". -Mark -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 1:39 PM To: CF-Talk Subject: sql help, easy one If I wanted to change the datatype of a column that is BigInt and ch

SOT - SQL help

2003-08-14 Thread James Johnson
Hello, I left my SQL in 10 Minutes book at the office, so sorry for the OT Post I have two tables "subscriber_ads" and "book_details" I need to get all the info out of "book_details" and one column, "ad_contact" out of "subscriber_ads". The common columns are "ad_id" and "subid" book_detail

RE: sql help, easy one

2003-08-14 Thread Tony Weeg
office 410.548.2337 fax 410.860.2337 -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 3:02 PM To: CF-Talk Subject: RE: sql help, easy one Tony, Yes this is doable on msSql. ALTER TABLE table ALTER COLUMN column_name int Be aware

sql help, easy one

2003-08-14 Thread Tony Weeg
If I wanted to change the datatype of a column that is BigInt and change it to int is this possible with an alter table query? thanks/ tony weeg uncertified advanced cold fusion developer tony at navtrak dot net www.navtrak.net office 410.548.2337 fax 410.860.2337 ~~

Re: sql help

2003-08-10 Thread Jochem van Dieten
Wurst, Keith D. wrote: > i would like to write a sql query that finds everywhere an ' occurs in a > field (ie. 's). does anyone know the syntax for this type of statement? SELECT field FROM table WHERE field LIKE Jochem ~|

RE: sql help

2003-08-09 Thread Bryan F. Hogan
L PROTECTED] Sent: Friday, August 08, 2003 11:05 AM To: CF-Talk Subject: sql help i would like to write a sql query that finds everywhere an ' occurs in a field (ie. 's). does anyone know the syntax for this type of statement? thanks. ~~

sql help

2003-08-09 Thread Wurst, Keith D.
i would like to write a sql query that finds everywhere an ' occurs in a field (ie. 's). does anyone know the syntax for this type of statement? thanks. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscri

SOT: SQL Help needed

2003-07-23 Thread Cutter (CF-Talk)
I'm rewriting the shopping cart for a boutique. It's a generous mixture of JS and CFM. An issue that I have is this... I have a table of sizes and their IDs I have a table of colors and their IDs I have a table of Items and their specs. Two of the fields hold a comma delimited listing of IDs, on

RE: SQL help

2003-07-22 Thread Bruce, Rodney S HQISEC/Veridian IT Services
always seem to miss the simple stuff. removing the ' worked. Thanks for the help Rodney -Original Message- From: Bruce, Rodney S HQISEC/Veridian IT Services [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 3:10 PM To: CF-Talk Subject: SQL help Hi all We are finally tri

RE: SQL help

2003-07-22 Thread Ciliotta, Mario
Types int -Original Message- From: Bruce, Rodney S HQISEC/Veridian IT Services [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 3:10 PM To: CF-Talk Subject: SQL help Hi all We are finally tring to upgrate from Access to SQL 2000. I am working on making the necessary changes to the queries.

Re: SQL help

2003-07-22 Thread Casey C Cook
. "Bruce, Rodney S HQISEC/Veridian IT Services" 07/22/2003 12:10 PM Please respond to cf-talk To: CF-Talk <[EMAIL PROTECTED]> cc: Subject:SQL help Hi all We are finally

Re: SQL help

2003-07-22 Thread Casey C Cook
lk <[EMAIL PROTECTED]> cc: Subject:SQL help Hi all We are finally tring to upgrate from Access to SQL 2000. I am working on making the necessary changes to the queries. One I am having a problem with is were the WHERE statement is: WHERE (proj_name = '#Qgetinf

RE: SQL help

2003-07-22 Thread Josh Remus
gt; Sent: Tuesday, July 22, 2003 3:10 PM > To: CF-Talk > Subject: SQL help > > > Hi all > > We are finally tring to upgrate from Access to SQL 2000. > > I am working on making the necessary changes to the queries. > > One I am having a problem with is

RE: SQL help

2003-07-22 Thread Ryan Emerle
..and(datepart(m,work_day) =#m#) -Ryan -Original Message- From: Bruce, Rodney S HQISEC/Veridian IT Services [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 3:10 PM To: CF-Talk Subject: SQL help Hi all We are finally tring to upgrate from Access to SQL 2000. I am working on

SQL help

2003-07-22 Thread Bruce, Rodney S HQISEC/Veridian IT Services
Hi all We are finally tring to upgrate from Access to SQL 2000. I am working on making the necessary changes to the queries. One I am having a problem with is were the WHERE statement is: WHERE (proj_name = '#Qgetinfo.proj_name# ') and(datepart('M',work_day) =#m#) m=number for the month: m=5.

RE: OT: SQL Help

2003-03-19 Thread JS
I found the solution. I needed a where statement on the uid field. where table1.uid = table2.uid Thanks, JS __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

<    1   2   3   4   5   >