I'm sure I'm asking a very easy question, but I am currently in the process of migrating from MS SQL to PostgreSQL and I am facing a few issues, which I would appreciate your help/advice on :
1. Is there a way to overcome what seems to be everything turning to lowercase in a query? For example this was the original stored procedure in MS SQL :
Expand|Select|Wrap|Line Numbers
- CREATE PROCEDURE sp_GetMessages
- @UserID Int,@ReadStatus1 int,@ReadStatus2 int
- AS
- SELECT messaging.id,MsgRead,MsgSubject,MsgAction,UserID,SenderID,nick_name,priority,MsgBody
- FROM messaging LEFT JOIN user_profiles ON messaging.SenderID=user_profiles.id
- WHERE UserID=@UserID AND (MsgRead=@ReadStatus1 OR MsgRead=@ReadStatus2)
- ORDER BY messaging.id DESC
2. Secondly is it actually better to use stored functions, or am I better off using normal SQL queries?
In case it helps, I am running a VB frontend to access this database.
Thanks for any advice you can give.
Sparky.