Convert from MS Access to SQL 2005

Tags:
Microsoft Access
Query Manager
SQL 2005
SELECT Format(DTrans.DATE,'dd/mmm/yyyy') AS dated, DTrans.trntype as Expr1 , DTrans.JVNO, 'By ' & FINNACCO.ACCNAME , (select analscode from INCEXPAN where analscode=val(DTrans.CRANALSCODE) and accode=craccode) AS CRANALSCODE, '' , DTrans.AMOUNT, dtrans.craCCODE AS accode, DTrans.jID,'','',dtrans.narration,dtrans.status FROM DTrans INNER JOIN FINNACCO ON DTrans.dRACCODE = FINNACCO.ACCODE order by DTrans.DATE


Software/Hardware used:
software

Answer Wiki

Thanks. We'll let you know when a new response is added.

You could use the CONVERT function to format dates (although it could be more efficient to do that on the front-end), and the ‘+’ operator to concatenate strings.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Denny Cherry
    Queries as columns are very inefficient when dealing with large record sets. You may want to adjust those to being LEFT OUTER JOINs.
    66,185 pointsBadges:
    report
  • msi77
    For "val" use CAST or CONVERT also.
    1,670 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following