Re: SQL Help

2002-07-22 Thread S . Isaac Dealey
> Since lovely M$ Sql does not have a select last_day function like oracle I > was wondering if anyone had written a script that will take the month > number and return either the number of days or the last day of that month? Is there a particular reason it needs to be in the db? ... declare @my

Re: SQL Help

2002-07-30 Thread Clint Tredway
Take out the commas and all will be good. HTH Clint Tredway - Original Message -- from: James Blaha <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] date: Tue, 30 Jul 2002 14:28:52 -0400 Can any one help me out here? I'm having a problem getting this query

RE: SQL Help

2002-07-30 Thread Janine Jakim
You shouldn't have the commas in there- you're using and clauses so try WHERE ReqNO > 0 AND(ReqNo='#ReqNo#') AND(FIRSTNAME LIKE '#FIRSTNAME#%') and on and on and on. -Original Message--

RE: SQL Help

2002-07-30 Thread Ben Doom
: Can any one help me out here? I'm having a problem getting this query to : work with putting in the proper commas when necessary in myWHERE clause : for the SQL statement. Don't put commas in the where clause. :-) --Ben Doom Programmer & General Lackey Moonbow Software

RE: SQL Help

2002-07-30 Thread Jim Vosika
Just remove the commas. You shouldn't need them... HTH, Jim Vosika http://tinyclick.com Free URL Shortening! -Original Message- From: James Blaha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 1:29 PM To: CF-Talk Subject: SQL Help Can any one help me out here? I'm having a pr

RE: SQL Help

2002-07-30 Thread Venable, John
I don't think you need commas at all, the AND is the logical breakup of statements. John -Original Message- From: James Blaha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 2:29 PM To: CF-Talk Subject: SQL Help Can any one help me out here? I'm having a problem getting this qu

RE: SQL Help

2002-07-30 Thread Craig Thomas
# sign alert! ..you don't need those in 's to reference a variable. works. -Craig >>-Original Message- >>From: Venable, John [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, July 30, 2002 2:41 PM >>To: CF-Talk >>Subject: RE: SQL Help >>

Re: SQL Help

2002-07-30 Thread Alex
SELECT * FROM HRWebAgent.tApply WHERE ReqNO > 0 AND 0=0 , AND(ReqNo='#ReqNo#') , AND(FIRSTNAME LIKE '#FIRSTNAME#%') On Tue, 30 Jul 2002, James Blaha wrote: > Can any one help me out

Re: SQL Help

2002-07-30 Thread Alex
disregard this. I know ...the commas. On Tue, 30 Jul 2002, Alex wrote: > > SELECT * > > FROM HRWebAgent.tApply > > WHERE ReqNO > 0 > AND 0=0 > >, AND(ReqNo='#ReqNo#') > > > >, AND(FIRSTNAME LIKE '#

RE: SQL Help

2000-09-24 Thread Mark Warrick
Silly question but have you tried a right outer join? SELECT A.*, B.new FROM A RIGHT JOIN B ON A.areacode = B.areacode WHERE A.status = 'ACTIVE' AND B.year = 2000 --mark -- Mark Warrick Phone: (714) 547-5386 Efax.com Fax: (801) 730-72

Re: SQL Help

2000-09-24 Thread Jim McAtee
Yep. Left, right and inner joins all produce the same result. Jim -Original Message- From: Mark Warrick <[EMAIL PROTECTED]> To: CF-Talk <[EMAIL PROTECTED]> Date: Sunday, September 24, 2000 4:15 PM Subject: RE: SQL Help Silly question but have you tried a right outer joi

RE: SQL Help

2000-09-24 Thread Mark Warrick
> To: CF-Talk > Subject: Re: SQL Help > > > Yep. Left, right and inner joins all produce the same result. > > Jim > > > -Original Message- > From: Mark Warrick <[EMAIL PROTECTED]> > To: CF-Talk <[EMAIL PROTECTED]> > Date: Sunday,

RE: SQL Help

2000-09-25 Thread Richard Kern
The post is not entirely clear, You imply wanting 682 records (all A 'along with "news"') but specify only 593. Selecting only 'actives' in A will get 593 as you desire. But, I will consider that you want records from A and B that meet your criteria. In that case 89 records meet 'active' and

Re: SQL Help

2000-09-25 Thread Jim McAtee
y the first of which would have news for 2000. Note that I'm selecting some other fields from TABLE1, but just News from TABLE2. Thanks, Jim -Original Message- From: Richard Kern <[EMAIL PROTECTED]> To: CF-Talk <[EMAIL PROTECTED]> Date: Monday, September 25, 2000 11:12

RE: SQL Help

2000-09-25 Thread Hayes, David
create a join which displays all the data? From there you should be able to start adding WHERE clause items. -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Monday, September 25, 2000 12:57 PM To: CF-Talk Subject: Re: SQL Help Richard, Thank you for your help. Ma

Re: SQL Help

2002-08-09 Thread Matthew Walker
Make sure you are ordering by LocationName, then #LocationName# #Ball# Is that what you mean?? - Original Message - From: "JLH All Turbo" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Saturday, August 10, 2002 1:36 AM Subject: SQL Help > How can I

RE: SQL Help

2002-08-09 Thread Pascal Peters
SELECT location, ball FROM table ORDER BY location, ball #qTest.location# #qTest.ball# -Original Message- From: JLH All Turbo [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 augustus 2002 15:36 To: CF-Talk Subject: SQL Help How can I structure a query

Re: SQL Help

2002-08-09 Thread JLH All Turbo
#x27;s organizing the data by the style it's just... I want each style to have a header when outputted. I hope this makes more sense. :-) J - Original Message - From: "Matthew Walker" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, A

Re: SQL Help

2002-08-09 Thread JLH All Turbo
Woops, I didn't mean to post that query in there. Hehe. Sorry, disregard it. J - Original Message - From: "JLH All Turbo" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, August 09, 2002 9:49 AM Subject: Re: SQL Help

RE: SQL Help

2002-08-09 Thread Pascal Peters
# -Original Message- From: JLH All Turbo [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 augustus 2002 15:50 To: CF-Talk Subject: Re: SQL Help Actually let me show you SELECT dbo.listings.address1, dbo.listings.city, dbo.listings.address1, dbo.listings.zip, dbo.listings.year_built

RE: SQL Help

2002-08-20 Thread Robertson-Ravo, Neil (REC)
jeez dude, bone up in the privacy of your own home :-) -Original Message- From: Matthew Friedman [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:35 To: CF-Talk Subject: SQL Help Does anyone have a good site to bone up on SQL. I am looking to beef up my kn

RE: SQL Help

2002-08-20 Thread Tony Weeg
410.548.2337 -Original Message- From: Robertson-Ravo, Neil (REC) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:29 AM To: CF-Talk Subject: RE: SQL Help jeez dude, bone up in the privacy of your own home :-) -Original Message- From

RE: SQL Help

2002-08-20 Thread Ian Tait
I bought a copy before I even realised it was by the man... Damn eh? -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:37 To: CF-Talk Subject: RE: SQL Help had to go there huh neil :) on a serious note, I would get the SQL in 10 minutes book by Mr

RE: SQL Help

2002-08-20 Thread Adrian Lynch
I'll second that. Well the bit about it being cool, not the devcon bit :OP Ade -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:37 To: CF-Talk Subject: RE: SQL Help had to go there huh neil :) on a serious note, I would get the SQL in 10 mi

RE: SQL Help

2002-08-20 Thread Tony Weeg
o attend" ..tony Tony Weeg Senior Web Developer Information System Design Navtrak, Inc. Fleet Management Solutions www.navtrak.net 410.548.2337 -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:42 AM To: CF-Talk Subject: RE: SQL Hel

RE: SQL Help

2002-08-20 Thread Philip Arnold - ASP
> Does anyone have a good site to bone up on SQL. > > I am looking to beef up my knowledge of stored procedures and > learn all of the functions that MS SQL 2000 support. Try SWYNK.com - they have some useful stuff there Philip Arnold Technical Director Certified ColdFusion Developer ASP Multime

RE: SQL Help

2002-08-20 Thread Robertson-Ravo, Neil (REC)
couldn't resist it.. -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:37 To: CF-Talk Subject: RE: SQL Help had to go there huh neil :) on a serious note, I would get the SQL in 10 minutes book by Mr Forta. its cool. its easy to read. we

RE: SQL help

2002-05-10 Thread Bryan Love
you have two options... leave the isFeatured column out of the SELECT clause so that the DISTINCT operator works, OR order the results by product name then +---+ Bryan Love Macromedia Certified Professional Internet Application Developer

Re: SQL Help

2002-01-10 Thread Douglas Brown
I am not sure what is happening. It should not insert a value of 101 if your max is 10. Say I have a table that only has 7 rows because I deleted 3 and my max is ten, when I insert it should give me 11. I always hated identity fields, that is why I do not use them. There are two major product

RE: SQL Help

2002-01-10 Thread Bill Grover
The system is working as designed. The identity column keeps incrementing the number to use. so if you do 100 inserts then delete 90 records the next ID used will be 101. The question is, why do you need this number? The usual places where I've seen it needed is when you are doing an insert

Re: SQL Help

2002-01-10 Thread Waldemiro Junior
Thanks a lot Bill - Original Message - From: "Bill Grover" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002 4:17 PM Subject: RE: SQL Help > The system is working as designed. The identity column keeps > in

Re: SQL Help

2002-01-10 Thread Dick Applebaum
In SQL Server, identity fields, a number is never reused... deletes do not reset the counter to the next available identity value. When you think about what goes on under the covers (of SQL), it makes sense. SQL would need to maintain a linked list (or somesuch) of deleted identity values to b

RE: SQL Help

2002-01-11 Thread Stuart Miller
Your query will run in Query Analyzer because analyzer uses transact sql. If you're interested in getting the primary key of a record you have just inserted in your CF application, I use . Like this: INSERT INTO TAUX_001 (DSC_CHKLST , IND_STATUS)

RE: SQL Help

2002-01-11 Thread Allan Pichler
or you can add a trigger to the sql server that runs on insert statements to that table SELECT @@IDENTITY as newID @llan -Original Message- From: Stuart Miller [mailto:[EMAIL PROTECTED]] Sent: 11. januar 2002 14:32 To: CF-Talk Subject: RE: SQL Help Your query will run in Query

RE: SQL Help

2002-01-11 Thread Daye, Marianne
ds.rti.org -Original Message- From: Allan Pichler [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 8:40 AM To: CF-Talk Subject: RE: SQL Help or you can add a trigger to the sql server that runs on insert statements to that table SELECT @@IDENTITY as newID @llan -Origin

RE: SQL Help

2002-01-11 Thread Bill Grover
I usually do it by creating a stored procedure that does the insert and the select. CREATE PROCEDURE MyInsert @tcCHKLST varchar(20), @tnINDSTAT int AS INSERT INTO TAUX_001 (DSC_CHKLST , IND_STATUS) VALUES (@tcCHKLST , @tnINDST

Re: sql Help

2002-01-22 Thread Douglas Brown
shouldn it be select @datevar = There are two major products that come out of Berkeley: LSD and [Unix] BSD. We don't believe this to be a coincidence. Doug Brown - Original Message - From: "Joshua Tipton" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, Janu

Re: sql Help

2002-01-22 Thread Douglas Brown
Sorry, should be set dateformat mdy declare @datevar smalldatetime select @datevar = getdate() select convert(smalldatetime, @datevar, 101) There are two major products that come out of Berkeley: LSD and [Unix] BSD. We don't believe this to be a coincidence. Doug Brown - Original Mess

Re: SQL: Help!

2001-04-04 Thread Edward Smith
Database? If it is Oracle, I might use the "MINUS" Operator: SELECT C.CompanyID, P.Product ID FROM Company C, Product P MINUS SELECT C.CompanyID, S.Product ID FROM Company C, StoreProducts S To get Company->Product Uniques And swap the two queries to get StoreProducts uniques. Not sure if an

Re: SQL: Help!

2001-04-04 Thread Edward Smith
Irk, I, of course, forgot to join Company and Products, et al... Oracle: SELECT C.CompanyID, P.Product ID FROM Company C, Product P WHERE C.CompanyID=P.CompanyID MINUS SELECT C.CompanyID, S.Product ID FROM Company C, StoreProducts S WHERE C.CompanyID=S.CompanyID SQL7: SELECT C.CompanyID, P.Pro

RE: SQL: Help!

2001-04-04 Thread Philip Arnold - ASP
> SQL7: > > SELECT C.CompanyID, P.Product ID > FROM Company C, Product P > WHERE WHERE C.CompanyID=P.CompanyID > AND NOT EXISTS > (SELECT C.CompanyID, S.Product ID > FROM Company C, StoreProducts S > WHERE C.CompanyID=S.CompanyID) Obviously you only want one "WHERE" statemen

RE: SQL: Help!

2001-04-05 Thread Duane Boudreau
Thanks for the quick answer - sorry for the slow reply. Works like a charm. Duane -Original Message- From: Edward Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 12:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: SQL: Help! Database? If it is Oracle, I

RE: SQL help

2001-04-16 Thread Dave Livingston
*This message was transferred with a trial version of CommuniGate(tm) Pro* This should do it in MS-SQL Server. I think Oracle has a different Date convert function. SELECT title, date, where, description, time FROM my table WHERE (date > CONVERT(DATETIME, '2001-4-16 00:00:00', 102)) ORDER BY dat

RE: SQL help

2001-04-16 Thread Hoffman, Joe (CIT)
Jeff, >Something like this If you are actually using 'date', 'time' and 'where' as field names in your database ... they are SQL reserved word. If they are not, perhaps: SELECT title, titledate, titlewhere, description, titletime FROM my table WHERE titledate >= #CreateODBCDate(NOW())# ORDER

RE: SQL help

2001-07-30 Thread Glenn Olsen
Try ... DECLARE @MRID int SET @MRID = (SELECT MIN(ID) AS MRID FROM HomePageReleases) DELETE HomePageReleases WHERE ID = @MRID -Original Message- From: S R [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 5:02 PM To: CF-Talk Subject: SQL help I'm trying to get this sql statement

RE: SQL help

2001-07-30 Thread S R
Thanks. It worked. >From: Glenn Olsen <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: SQL help >Date: Mon, 30 Jul 2001 17:21:18 -0400 > >Try ... > >DECLARE @MRID int >SET @MRID = (SELECT MIN(ID

RE: SQL HELP

2002-10-15 Thread Tony Weeg
first of all I don't think you need the first () try this. SELECT * FROM temptblJOBEVL WHERE SYS_EMP_ID_NR NOT IN (SELECT emp_id_nr FROM tblemployee) ..tony Tony Weeg Senior Web Developer Information System Desi

RE: SQL HELP

2002-10-15 Thread Andy Ewings
-Talk Subject: RE: SQL HELP first of all I don't think you need the first () try this. SELECT * FROM temptblJOBEVL WHERE SYS_EMP_ID_NR NOT IN (SELECT emp_id_nr FROM tblemployee) .tony Tony Weeg Senior Web

RE: SQL HELP

2002-10-15 Thread Joshua Tipton
Still returns zero rows. Josh -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 8:38 AM To: CF-Talk Subject: RE: SQL HELP first of all I don't think you need the first () try this. SELECT * FROM temptblJOBEVL

RE: SQL HELP

2002-10-15 Thread Joshua Tipton
Both char(10) I can change them to int is you think it would make a difference. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 8:44 AM To: CF-Talk Subject: RE: SQL HELP shouldn't make a difference. What field type is emp_id in

Re: SQL HELP

2002-10-15 Thread Jochem van Dieten
Joshua Tipton wrote: > For some unknown reason this query does not work correctly even though > I know that there is data in temptbljobevl that does not match > tblemployee data. Can someone please help me do this via a join. I doubt that rewriting as a join is going to solve anything. That w

RE: SQL HELP

2002-10-15 Thread Andy Ewings
yes it may - unless you put ltrim(rtrim()) around the field values - change to an int and see what hapens -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: 15 October 2002 13:52 To: CF-Talk Subject: RE: SQL HELP Both char(10) I can change them to int is you think

RE: SQL HELP

2002-10-15 Thread Joshua Tipton
The column is char 10 when I change it to int it truncates my numbers so I do not want that. Josh -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 8:59 AM To: CF-Talk Subject: RE: SQL HELP yes it may - unless you put ltrim(rtrim()) around

RE: SQL HELP

2002-10-15 Thread Andy Ewings
FROM tblemployee) -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: 15 October 2002 14:04 To: CF-Talk Subject: RE: SQL HELP The column is char 10 when I change it to int it truncates my numbers so I do not want that. Josh -Original Message-

Re: SQL HELP

2002-10-15 Thread Jochem van Dieten
Joshua Tipton wrote: > The column is char 10 when I change it to int it truncates my numbers > so I do not want that. Use bigint/longint/int8 (or whatever your RDBMS calls 64 bit integers), but if they are numbers you really should store them in an integer datatype. Jochem ~~

Re: SQL HELP

2002-10-15 Thread Ian Lurie
ngs [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 15, 2002 8:59 AM > To: CF-Talk > Subject: RE: SQL HELP > > > yes it may - unless you put ltrim(rtrim()) around the field values - change > to an int and see what hapens > > -Original Message- > From: Jos

RE: SQL HELP

2002-10-15 Thread Bryan Love
ere must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis "Let's Roll" - Todd Beamer, Flight 93 -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 1

Re: SQL Help

2003-03-19 Thread Nick de Voil
- Original Message - From: "JS" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, March 19, 2003 1:42 PM Subject: OT: SQL Help > I know there are some smart SQL people on this list, > so I hope someone would be willing to help me with my > problem. > > I have 2 tables

Re: SQL Help

2003-03-19 Thread Nick de Voil
Sorry abot the fingers. What I was about to say was - is 600 and 400 the result you *want* or that you don't want? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.co

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 maki

RE: SQL help

2003-07-22 Thread Josh Remus
This is just a quick guess, but I would think you want DATEPART(m, work_day) rather than having the m in quotes. That's just first look at it based on SQL books online. > -Original Message- > From: Bruce, Rodney S HQISEC/Veridian IT Services > [mailto:[EMAIL PROTECTED] > Sent: Tuesday, Ju

Re: SQL help

2003-07-22 Thread Casey C Cook
Format: DATEPART(MONTH, '1/1/2003') *note the word MONTH is literally the word month, not a numeric equivalent. In your case the 1/1/2003 may be your coldfusion variable. CC This is a PRIVATE message. If yo

Re: SQL help

2003-07-22 Thread Casey C Cook
Or try (datepart(MM,work_day), something like that. Basically your syntax is a bit off. CC This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise

RE: SQL help

2003-07-22 Thread Ciliotta, Mario
You need to use (DATEPART(m,work_day) =#m#) If you have access to the ENTERPRISE MANAGER in SQL SERVER, you should have access to the online books, which have some pretty good examples in them. Not sure if it needs to be installed (option) when you install the Enterprise Manager. Here is the d

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 tring to up

RE: sql help

2003-08-09 Thread Bryan F. Hogan
I'm not sure exactly what your looking for. But I think this may solve your problem. SELECT myColumn FROM myTable WHERE myColumn LIKE "%'%" This will return all rows that contain ' in the myColumn -Original Message- From: Wurst, Keith D. [mailto:[EMAIL PROTECTED] Sent: Friday, Augus

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-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

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: SQL Help

2004-03-09 Thread Jeff Small
Hi Rodney, I'm not really able to help all that much, but what I suggest is trying the SQL mailing list. I replied and forwarded this to that list in an effort to get it over to "the SQL people". They're really great at this sort of stuff, and you might get a faster, better response from it. Have

RE: SQL Help

2004-03-09 Thread Mark A. Kruger - CFG
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 status field - either an int or a small character field and use a constraint ('open','closed','pending') and always

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 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 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 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
. 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 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 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-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-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
: 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 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 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-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

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]

RE: SQL Help

2003-10-22 Thread Tony Weeg
select (convert(varchar (255),m_month) + '/' + convert(varchar (255),m_day)) + '/' +  convert(varchar (255),m_year)) as date from myTable that is, if sqlserver is your database! its the + sign plus the '' filled with whatever delimiter you choose. The "CONCATENATOR" :) hth tw -Original Me

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-11-21 Thread Michael Traher
(Left(phone_list,3) in ('212','213')  OR phone_list like '%,212%' OR phone_list like '%,213%') but I would predict poor performance. No chance to change the database I guess? Michael Traher -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 17:23 To: CF-

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-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-12-16 Thread Cantrell, Adam
Try parameterizing your form.issuenumber variable: Update IssueRegister SET IssueStatus = '#form.IssueStatus#',  Response = '#form.Response#', ResponseUserId = '#session.activeuser.USER_NAME#',  DateofResponse = #CreateODBCdate(now())# Where Issu

Re: SQL help!

2004-08-10 Thread Phillip Beazley
At 03:18 PM 8/10/2004, you wrote: >This is probably basic, but my brain is not functioning at this point >today... > >I need to compare two tables. They both contain customer numbers. One table >mimics the other so the same data *should* be in each. It has come to my >attention that there are orph

RE: SQL help!

2004-08-10 Thread Jeff Waris
Quick and dirty .and it worked like a charm.. Thanks IN was where I shoulda been looking... Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: SQL help!

2004-08-10 Thread Claude Schneegans
>>SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM table2) >>SELECT * FROM table2 WHERE id NOT IN (SELECT id FROM table1) Yes, and may be UNION the two in one: SELECT id FROM table1 WHERE id NOT IN (SELECT id FROM table2) UNION SELECT id FROM table2 WHERE id NOT IN (SELECT id FROM table1) How

RE: SQL help!

2004-08-10 Thread Jeff Waris
That union worked well too... thanks! Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

RE: SQL help!

2004-08-12 Thread Bryan Love
-Original Message- From: Phillip Beazley [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:23 PM To: CF-Talk Subject: Re: SQL help! At 03:18 PM 8/10/2004, you wrote: >This is probably basic, but my brain is not functioning at this point >today... > >I need to compare

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 > >  

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 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 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]

  1   2   3   >