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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference book?

Status
Not open for further replies.

bmarks

IS-IT--Management
Sep 25, 2001
85
CA
I've been using MS SQL Server for a while and am quite comfortable doing complicated stored procedures.

I am now required to do similar work in InterBase. I am running into some problems since the syntax is often different and many of the functions and command available to me in SQL Server are either not available or are different in Interbase.

Can anyone recommend a good reference book or site where I can find the syntax and functions that I need?

Thanks in advance!
 
I waited a few days to see if anyone else had a book in mind for you but as I suspected it hasn't changed much since I first started using InterBase i.e. there are virtually no reference/tutorial books available on the subject. There is one on the FireBird website but I am not sure how relevant it would be.
 
Thanks for your response, unclejimbob, I was afraid of that. I had looked for one a couple of years ago when the company I worked for then acquired an accounting system that used IB and I needed more info and couldn't find any. I have done some searches on the Internet, Chapters, local computer bookstore to no avail.

I am now doing some work for a firm that sells a product that uses IB, so I need to be able to comfortably write IB stored procedures. So far, the basics are fine, but when I start trying to do some of the more complicated things that I did in SQL Server, I'm finding that they are often not supported in IB. I'm sure there are ways to do it in IB, but need to be able to learn them to use them.
 
What have the people on this forum used to learn the techniques needed?
 
I'm afraid that for me at least it was a case of:

a) hanging out on the TeamB newsgroups i.e. in order to glean as much general knowledge as possible (but you don't get much example code this way) and
b) trial and error using the Language Reference as a start point

...not a particularly efficient way to learn what is required :-(

I guess that as this forum isn't exactly overwhelmed with traffic one option would be to post examples of what you want and let people have a stab at it, obviously this is not the ideal solution for a time-critial app but in lieu of anything better ... :)


time constraints ut may be better than nothing. That way at some point we could loo
 
I have two books about Interbase, unfortunately (not for me), they are not in English.
Further I have a programming book that has code and explanation for Interbase and others.

The best documentation I got from Interbase it self. IB 5.5 had PDF files:
APIGUIDE, DATADEFINITION GUIDE, LANGUAGE REFERENCE wich have everything you need

Regards

Steven
 
Thanks unclejimbob and Steven. I will check out those pdfs (if they are also included in later versions!).

To let you know the sort of thing I'm looking for, which I ran into this week. In SQL Server, I would often use CASE statements in my Select. I did this fine in IB7.5 for one of the databases that my client is using. However, some of their customers are on a version of their software that runs on IB6. I tried to move my stored procedures into that environment and the CASE statement no longer works. I'm guessing that IB6 does not support CASE. So now I have to rewrite using something else, but not sure what the "proper" something else should be in that version.

I'm also trying to figure out the best way to do things I did in SQL Server like:
- using table variables in stored procedures
- creating, using, dumping temporary tables in stored procedures

The table variables is a big deal for me and I don't see them in IB. From code that is currently in their stored procedures, looks like it uses individual fields that hold arrays, but not sure if I understand the full usage and how to keep them together correctly as rows.

 
About the case statement, you are probably comminting a "sintaxe" error.

I have used stored procedures to create and dump temporary tables, and the way I figured it out was
1) create temporary table
2) do some modifications
3) delete temporary table

If you can do this 3 things, just combine the code in one stored procedure

Code:
SET TERM ^ ;

/* Stored procedures */

[b]CREATE PROCEDURE GENERATE_SURVEY_LIST 
(
  START_DATE TIMESTAMP,
  SURVEY_NUMBER INTEGER
)
AS[/b]
 begin



  /* fill temporary  table with traps */


 [b]insert[/b] into contemp ( txcode, txroute, txsequence)
select tcode, route, sequence from trapinv;


  
 /* Insert the date  */
    [b]update[/b] contemp
    [b]set[/b] txinsp_date = :START_DATE;

 /*insert the survey number */
    [b]update[/b] contemp
    [b]set[/b] txsurvey = :SURVEY_NUMBER;

 /* Set the initial result to "NA" or Not Analysed */
    [b]update[/b] contemp
    [b]set[/b] txResult = 'NA';

 

/* copy to inspection table */
   [b]insert[/b] into inspection (tcode, route, sequence, insp_date, survey, result)
   select *  from contemp; 


 /* EMPTY temporary table CONTEMP*/
     [b]delete[/b] from contemp;


 end
 ^

SET TERM ; ^

I have used in this example a temporary table which is always empty.

Steven
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top