[Top] [Prev] [Next] [Bottom]
[Contents]
DSQL Text
These DSQL objects are useful for manipulating the pubs2
database. Use the Object Editor to create and save those you need.
SELECT
au_id,
au_lname,
au_fname,
state
FROM
authors
ORDER BY
state,
au_lname,
au_fname
BD_TitleByAuId
SELECT
t.title_id,
t.title
FROM
titles t,
titleauthor ta,
authors a
WHERE
t.title_id = ta.title_id
AND
ta.au_id = a.au_id
AND
a.au_id = #au_id, WRAP#
BD_PublisherByAuId
SELECT
p.pub_id,
p.pub_name
FROM
publishers p,
titles t,
titleauthor ta,
authors a
WHERE
p.pub_id = t.pub_id
AND
t.title_id = ta.title_id
AND
ta.au_id = a.au_id
AND
a.au_id = #au_id, WRAP#
D_Authors
SELECT
au_id,
au_lname,
au_fname,
phone,
address,
city,
state,
country,
postalcode
FROM
authors
D_InsertAuthor
INSERT INTO
[authors]
(
[au_id],
[au_lname],
[au_fname],
[phone],
[address],
[city],
[state],
[country],
[postalcode]
)
VALUES (
#au_id, SQL_VARCHAR#,
#au_lname, SQL_VARCHAR#,
#au_fname, SQL_VARCHAR#,
#phone, SQL_CHAR#,
#address, SQL_VARCHAR#,
#city, SQL_VARCHAR#,
#state, SQL_CHAR#,
#country, SQL_VARCHAR#,
#postalcode, SQL_CHAR#
)
D_UPDATE_AUTHOR
update authors
set
au_lname = #lname, varchar(40)#,
au_fname = #fname, varchar(20)#,
phone = #phone, char(12)#,
address = #addr, varchar(40)#,
city = #city, varchar(20)#,
state = #state, char(2)#,
country = #country, varchar(12)#,
postalcode = #zip, char(10)#
where au_id = #id, char(11)#
D_DELETE_AUTHOR
delete from authors
where au_id = #id, char(11)#
D_deleteAuthor
DELETE FROM
[authors]
WHERE
[au_id] = #au_id, SQL_VARCHAR#
D_updateAuthor
UPDATE
[authors]
SET
[au_lname] = #au_lname, SQL_VARCHAR#,
[au_fname] = #au_fname, SQL_VARCHAR#,
[phone] = #phone, SQL_CHAR#,
[address] = #address, SQL_VARCHAR#,
[city] = #city, SQL_VARCHAR#,
[state] = #state, SQL_CHAR#,
[country] = #country, SQL_VARCHAR#,
[postalcode] = #postalcode, SQL_CHAR#
WHERE
[au_id] = #au_id, SQL_VARCHAR#
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.