Vishnu,

You can simply remove the cfqueryparam in the query that has been suggested
to you and use single quotes (for character data). It's not really relevant
to your problem (although it is good practice when using CF).  However, if
you are looking for a report query for Crystal - then it is going to be
challenging to get it right using this DB structure. For example:

SELECT username, dep_code
FROM username
WHERE ',' + dep_code + ',' LIKE  ('%,#searchvariable#,%')

Doesn't really allow you to "group" by department. Nor does it account for
mulitple departments or departments at the begining or end of the list. You
can account for these in other ways - but then what if some part of the
department string is duplicated?  Using CF + SQL you can 'work-around' a bad
design. it is much more difficult to work around a bad design using only
SQL.

-Mark

Mark A. Kruger, CFG, MSCE
www.cfwebtools.com
www.necfug.com

  -----Original Message-----
  From: vishnu prasad [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 08, 2004 7:40 AM
  To: CF-Talk
  Subject: Re: Urgent:coldfusion report

  Hi i need an SQL Query
  cos i am building report in Crystal report so i cant have structure and
cfqueryparam
  it would be nice  if i can  it in SQL query

  regards
  vishnu

  >If you want to know what tags ( & attributes) or functions you can use
  >in the different versions of CF (starting from CF4):
  >
  >http://www.macromedia.com/support/coldfusion/ts/documents/cfmlhistory.ht
  >m
  >
  >Pascal
  >
  >Structure
  >> noproblem if the query take time ,without using cfqueryparam i am
  >using
  >> 4.5 so i cannot use cfqueryparam
  >>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to