Query design - Mailing list pgsql-general

From R.Stevens
Subject Query design
Date
Msg-id 35CC987F.2B3243FB@ij.net
Whole thread Raw
List pgsql-general
Two Tables:

Blackbook
*********
key = vin char(8) + vinyr char(1)   -First field plus Second field

Auction
*******
key = vin[1-8] + vin[10]                   -First 8 characters plus the
tenth character of first field.

Need to create Join as follows:

Now, the query i've been experimenting goes something like this (but
does NOT work):

Select (A.vin || A.vinyr as BB), ...some other stuff..., (B.vin[1-8]
+B.vin[10]) as SS
From blackbook A, Sales B
Where A.make  = '$Input_from_var' and
              A.model = '$Input_form_var' and
              BB = SS

The $Input_form_variables are PHP varalbes - Ignore!

Am I using the correct syntax?


pgsql-general by date:

Previous
From: "Christopher S. Weimann"
Date:
Subject: Search on a large object?
Next
From: "Shawn T. Walker"
Date:
Subject: Re: [GENERAL] Postgres CGI Security Problem