Starting test.. battery2 
*************************************************************
0. drop old tables that may be lying around.. and set up a fresh sequences table
drop table countrysongs

*************************************************************
1. create table
create table countrysongs ( id, title, origin )

table countrysongs created in directory /home/scg/quisp/sqlexampledb/data
*************************************************************
2. tabdef(1) 
'countrysongs' has these fields:
 1. id
 2. title
 3. origin
No indexes.
*************************************************************
3. populate the table by selecting into from an original copy..
select * into countrysongs table from originals/countrysongs

*************************************************************
4. record count
select count(*) from countrysongs

__rowcount 
---------- 
325        
*************************************************************
****  retrievals  *******************************************
*************************************************************
10. 
select id, title from countrysongs where title contains 'beer' order by title, id

id                        title                        
--- -------------------------------------------------- 
33  Get Off the Table, Mabel (The Two Dollars is for t 
131    I Want a Beer as Cold as My Ex-Wife's Heart     
137       I Wish the Beer Was as Cold as the Bed       
174 If You Want to Keep the Beer Real Cold, Put it Nex 
225    Red Necks, White Socks, and Blue Ribbon Beer    
233       She's Looking Better After Every Beer        
269             There's A Tear In My Beer              
283             Warm Beer and Cold Kisses              
282                Warm Beer Cold Women                
*************************************************************
11. 
select id, title from countrysongs where title contains 'bed' order by title, id

id                        title                        
--- -------------------------------------------------- 
21  Does Your Chewing Gum Lose Its Flavor on the Bedpo 
34  Get Your Biscuits In The Oven, And Your Buns In Th 
80  I've Got Tears In My Ears From Lyin' On My Back In 
108 I Got Tears In My Ears From Lying On My Bed Crying 
111    I Got up on the Right Side of the Wrong Bed     
115 I Haven't Gone To Bed With Any Ugly Women, But I'v 
137       I Wish the Beer Was as Cold as the Bed       
189 Last Night I Went to Bed with a "10" and Woke this 
190     Lay Something On My Bed Besides A Blanket      
236     She Can Put Her Shoes Under My Bed Anytime     
255 Tearstains on My Pillow Are the Only Wet Spots in  
298       Whose Bed Have Your Boots Been Under?        
304 You'd think my Bed was a Bus Stop, the Way You Com 
*************************************************************
12. 
select _matchscore, title, origin from countrysongs where title contains 'johnny paycheck' 
	or origin contains 'johnny paycheck' order by _matchscore, id

_matchscore                       title                                              origin                       
----------- -------------------------------------------------- -------------------------------------------------- 
20                 Pardon Me, I've Got Someone To Kill                      by Johnny Paycheck (BMI)              
20                  I'm The Only Hell Mama Ever Raised                      by Johnny Paycheck (BMI)              
25             Red Necks, White Socks, and Blue Ribbon Beer                by Johnny Russell (ASCAP)              
25              She Can Put Her Shoes Under My Bed Anytime                      by Johnny Duncan                  
25          I'm Just an Old Chunk of Coal (But I'm Gonna be a  written by Billy Joe Shaver (BMI) Recorded by John 
25          I Caught her Drinking Johnny Walker with Tom, Dick                        null                        
*************************************************************
13. 
select _matchscore, title, origin from countrysongs where title contains '"johnny paycheck"' 
	or origin contains '"johnny paycheck"' order by _matchscore, id

_matchscore                title                         origin          
----------- ----------------------------------- ------------------------ 
20          Pardon Me, I've Got Someone To Kill by Johnny Paycheck (BMI) 
20          I'm The Only Hell Mama Ever Raised  by Johnny Paycheck (BMI) 
*************************************************************
14. 
select title, _matchscore from countrysongs where title contains 'mama hammer' order by _matchscore

title                                              _matchscore 
-------------------------------------------------- ----------- 
Mama Get The Hammer (There's A Fly On Papa's Head)     01      
I'm The Only Hell Mama Ever Raised                     05      
*************************************************************
****  updates *******************************************
*************************************************************
20. mismatched quotes - should give error
insert into countrysongs ( id, title, origin )
		values ( 328, 'I Love My Truck, It's Parked Outside', null )

shsql: error 2734: quote error 
shsql: error 2734 (command: insert into countrysongs ( id, title, origin )
		values ( 328, 'I Love My Truck, It's Parked Outside', null ))
*************************************************************
21. quote is now escaped with a preceding backslash
insert into countrysongs ( id, title, origin )
		values ( 328, 'I Love My Truck, It\'s Parked Outside', null )

*************************************************************
21. 
select id, title from countrysongs where title contains 'truck' order by title, id

id                 title                 
--- ------------------------------------ 
328 I Love My Truck, It's Parked Outside 
*************************************************************
22. this should find 1 row..
select id, title from countrysongs where title contains 'ketchum' or origin contains 'ketchum' order by title, id

id                   title                    
-- ------------------------------------------ 
28 Don't Strike A Match (To The Book Of Love) 
*************************************************************
23. 
update countrysongs set origin = null where id = 28

*************************************************************
24. this should find 0 rows..
select id, title from countrysongs where title contains 'ketchum' or origin contains 'ketchum' order by title, id

id title 
-- ----- 
