> 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
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
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--
: 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
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
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
# 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
>>
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
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 '#
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
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
> 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,
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
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
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
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
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
#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
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
#
-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
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
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
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
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
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
> 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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
> 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
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
*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
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
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
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
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
-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
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
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
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
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
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
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-
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
~~
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
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
- 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
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
..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
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
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
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
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
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
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
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
~|
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. '
> 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
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
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
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%
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
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
-
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
.
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
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
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
-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
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
: 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
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
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
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
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]
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
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
(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-
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
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
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
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
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]
>>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
That union worked well too... thanks!
Jeff
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
-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
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
>
>
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
>
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
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 - 100 of 260 matches
Mail list logo