Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help to write a Function

Status
Not open for further replies.

Olivia123

MIS
Apr 19, 2007
29
0
0
US
Hello,
I need help to write a SQL Statement/ Function that would read this table below...

glrd_acct*glrd_acct1*glrd_cc*glrd_cc1*glrd_user1*code_desc
6401 * 6405 * 1 * 900* 121.01 * SS
8000 * 8999 * 700 * 755 * 150 * AA
9100 * 9120 * A030 * A030 * 389.DUBU * EE

Basically, I need if Account is between glrd_acct and glrd_acct1 and has a CallCenter between glrd_cc and glrd_cc1.....THEN '"'||trim(Account)||'-code_desc"'

Thank you



 
You may wish to post this question in a forum that is specific to the database you use.

For Access that would be
For Microsoft SQL Server that would be
Where does Account come from? Is that a column name in a different table? Is it a parameter value from a form?

It may be that a CASE expression or an IIf() function could do the job.
 
it can't be access or sql server -- note the very handsome, ANSI-compatible double pipes

;-)

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top