Thanks both Teddy and Dean. I was hoping for a quick way to do this but I'm
actually almost finished doing it one table at a time manually with the GUI.
Still this info is good to know.
Dusty
_
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy R Payne
Sent: Tuesday, J
For SQL Server 200, the master database holds the information for the metadata
for databases on that particular server instance.
If you have access to this database, there should be some views pre-made by SQL
Server that should show some of this information.
Teddy
- Original Message -
Check out the sysobjects tables. Information_schema is a standard
schema implemented by most RDBMS to handle a lot of the metadata, but
I don't think it contains metadata on FKs.
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"Dissent is the purest form of patriotism."
--Thomas Jeffer
I'm afraid I don't have any experience using metadata. I looked at the
metadata folder icon in enterprise manager but nothing obvious to me so I
guess I would need to study on that a bit. For now I'm doing it one table at
a time through the GUI unless someone could advise further.
Thanks for the
Fair enough...
Why not use the metadata in the DB to identify all of the FKs and
then write a script to drop them?
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"[U]nconstitutional behavior by the authorities is constrained only
by the peoples' willingness to contest them"
--John P
Normally I would agree ... but this is a judgment call for other reasons.
Also this is not the real copy of the database and the data being served
will not be affected by it.
_
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe
Sent: Tuesday, June 05, 2007 4:02 P
So you'd rather have no foreign key relationships and let the DB get
all out of whack rather than figure out the DTS issues? I think
you're looking at the wrong problem, I'd spend my time figuring out
the DTS and making sure it works correctly.
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTEC
Speaking of OT SQL help ...
If there are any database gurus out there that could throw me a bone and
send me some sql code that would detect and remove foreign key relationships
from tables (sql server 2000). If you're thinking "why would I want to do
this?" it is because this database gets updat
Or he hasn't yet been bit by management that says they need to change
RDBMS... migrating stored procs is hell. Migrating CF code is much
easier, in general. It also keeps the business logic in one layer of
code, not spread across the code and DB.
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PRO
MessageI am a fn of abstracting my persistence layer through an ORM, which does
use cfqueries or through stored procs when an ORM is not available. =)
Teddy
- Original Message -
From: shawn gorrell
To: discussion@acfug.org
Sent: Tuesday, June 05, 2007 2:54 PM
Subject: Re: [A
Why is that? You don't still believe that stored procedures always perform
better do ya? ;)
- Original Message
From: Teddy R Payne <[EMAIL PROTECTED]>
To: discussion@acfug.org
Sent: Tuesday, June 5, 2007 2:09:40 PM
Subject: Re: [ACFUG Discuss] OT: SQL help
Message
You use it in a
MessagePaul,
Here was my 2 minute approach:
-- variables
declare
@order_ID int
, @optionIDs varchar(2000)
-- constants
select
@orderID = 12387
-- get the list of numbers from the column
SELECT
@optionIDs = oi.optionIDs
FROM
dbo.ORDER_ITEMS oi
LEFT OUTER JOIN dbo.AP_translati
Maybe I missed something, but why wouldn't you just use a cfqueryparam with a
type of sql_int and list="yes".
- Original Message
From: Paul Morton <[EMAIL PROTECTED]>
To: discussion@acfug.org
Sent: Tuesday, June 5, 2007 1:36:40 PM
Subject: [ACFUG Discuss] OT: SQL help
Message
I a
Teddy,
Any idea why do I get an error in Query Analyzer :
SQL Statement
SELECT *
FROM dbo.ORDER_ITEMS oi LEFT OUTER JOIN
dbo.AP_translation tr ON tr.option_id IN
(select convert(int,Value) from dbo.Split(oi.OptionIDs, ','))
WHERE (oi.Order_ID = 12387)
Error
MessageYou use it in an adhoc query in query analyzer or SSMA. I have not
tried it as an ad hoc query in CF as I myself tend not to use cfquery wherever
I can.
Teddy
- Original Message -
From: Paul Morton
To: discussion@acfug.org
Sent: Tuesday, June 05, 2007 1:58 PM
Subject
Dean,
I am not arguing how the list was stored for Paul's case. I provided a link
and functionality to a helper function that helps massage lists from the
perspective of TSQL and CF alike.
As for purely looking at Paul's case, you are right.
In the future, I will endeavor to alleviate quick st
Without creating a SP, can I use this in a select statement?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy R Payne
Sent: Tuesday, June 05, 2007 11:45 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] OT: SQL help
Paul,
There is already an
Sure it is, Teddy. 1NF requires atomic data. Data with formatting,
such as a list, is not atomic and therefore not 1NF.
http://databases.about.com/od/specificproducts/a/firstnormalform.htm
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
Here in America everything is bought and sold, you ca
I do not see it as a violation of the 1NF, but more of a tool to turn a CF list
into a query in SQL Server so that you can loop over a list in TSQL without
using text searches.
This enables you to have the ability to convert badly formed data into
normalized data.
Teddy
- Original Messag
I am a fan of QuickRex:
http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html
It is a eclipse view that you can test by copying text in a text box and
then execute regex against it and it highlights what you regex will cover.
Teddy
- Original Message -
From: "John
DB is not my design. Trying to retrofit.
The split was an attempt to fix this code:
SELECT *
FROM dbo.ORDER_ITEMS oi LEFT OUTER JOIN
dbo.AP_translation tr ON tr.option_id IN
(oi.OptionIDs)
WHERE (oi.Order_ID = 12387)
Error received:
Server: Msg 245, Leve
MessagePaul,
There is already an open source function in SQL Server to do this for you:
http://www.4guysfromrolla.com/webtech/031004-1.shtml
They explain how to put it together.
Here is the function creation for how I put it together from their explanation:
if exists (select * from dbo.sysobj
Even further off topic... why in the heck does a varchar have a comma
delimited list in it? That violates the first degree of normalization.
Also, why do you need to split it for an in clause? If the field
data is wrapped in parenthesis, shouldn't it work as is?
-dhs
Dean H. Saxe, CISSP
I apologize for the OT post, but I'm getting frustrated.
I am attempting to use a UDF to split a varchar (comma delimited list of
ints) in an IN clause in a SQL statement, and I'm not able to get the SQL
statement to pass a Table field to the UDF.
I'm hoping someone sees a glaring error, or can
RegEx coach
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"What difference does it make to the dead, the orphans, and the
homeless, whether the mad destruction is wrought under the name of
totalitarianism or the holy name of liberty and democracy? "
--Gandhi
On Jun 5, 2007, at 1
I use this: http://regexlib.com/RETester.aspx
On 6/5/07, John Mason <[EMAIL PROTECTED]> wrote:
Is there a good regex testing tool out there. I tend to test straight off my
cf code which is cumbersome at times.
John
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[
Good luck, the regex might need a bit of tweaking. Also, I didn't
anchor it to line beginnings/endings, since I don't know the data
format well enough to know if that is an issue for you.
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
Here in America everything is bought and sold, you can
Is there a good regex testing tool out there. I tend to test straight off my
cf code which is cumbersome at times.
John
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe
Sent: Tuesday, June 05, 2007 1:15 PM
To: discussion@ac
Thanks dean, I'll give this a shot.
On 6/5/07, Dean H. Saxe <[EMAIL PROTECTED]> wrote:
Don't need the lookarounds
Use this regex and save $1 and $3 /( I was actually just looking for a regex solution to parsing up many
> lines of text, some of which contain urls. And if those url's have a
>
FWIW, this is an untested regex from off the top of my head...
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"[T]he people can always be brought to the bidding of the leaders.
This is easy. All you have to do is to tell them they are being
attacked, and denounce the pacifists for lack of
Don't need the lookarounds
Use this regex and save $1 and $3 /(+=\S+\s+\S&?)/gx
Then use this on $2 to replace the spaces s/\s/+/gx.
Then push $1 and $2 back together to get your whole string.
That's the perl way...
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"What is objectionable
I was actually just looking for a regex solution to parsing up many
lines of text, some of which contain urls. And if those url's have a
space on the query string to replace those spaces on the query string
with the + character.
I could use CF but, was trying to just get the regex. Possbly using
That would work if it was in the query string. He's trying to URL
encode a query string as part of a larger string... not the query
string he's receiving. But honestly it shouldn't be necessary, since
most (all?) clients will handle that for you.
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROT
I used to have to do regular expression stuff a lot (and in a language
called Vortex/Texis web-script) but haven't lately.
My best guess is:
REReplace (CGI.Query_String, " ", "+","ALL")
or if it is URLEncoded
REReplace(URLDecode(CGI.Query_String), " ", "+","ALL")
think that'll do it but haven
do you plan to save the complete url in a variable or just search keyword in
a variable? For example varUrl = http://blah.com?search=SomeLingering Suspicion"
target="_blank">"A Lingering Suspicion"
or varUrl = "Some Lingering Suspicion"
Please clarify.
Ajas.
On 6/5/07, Steven Ross <[EMAIL PRO
in this string:
15) http://blah.com?search=Some Lingering Suspicion"
target="_blank">"A Lingering Suspicion"
i want to search for the spaces inside:
?search=Some Lingering Suspicion
and replace those spaces with + so it should end up looking like this:
?search=Some+Lingering+Suspicion
Can th
36 matches
Mail list logo