-
How Do i combine this two queries Help(Addition to the below one
have a Query that is workng well
select * from property
where
substring(func_key,1,5) = 'GEOSS' And substring(func_key,6,8)>= 3
it Display all the records that has 'GEOSS' and has a functional key that is equal to 3 and greater than 3. the Query is working.
NB:* The 'GEOSS' Records are Subtyptes of PVOOOOOO Records. It means that the main Key will be like '022100550.PV000000' and the Subtypes will be
'022100550.GEOSS001
'022100550.GEOSS002
'022100550.GEOSS003
Those are subtypes of 022100550.PV000000. above SQL statement searches them and Exclude the main key, i need a separate key that will show all main keys of the subkeys. that means all the PV000000 that has Sub keys GEOSS.
select * from property
where
substring(func_key,1,5) = 'GEOSS'
And substring(func_key,6,8)>= 3 and
where substring(func_key,9,16)='PV000000'
And Attrib_code = substring(Attrib_code,5,2)=16
All this above query can get me what i want,but SQl you kow will never allow such query
Vuyiswa
-
Your query is fine except the extra WHERE,
select * from property
where substring(func_key,1,5) = 'GEOSS'
And substring(func_key,6,8)>= 3
and substring(func_key,9,16)='PV000000'
And substring(Attrib_code,5,2)=16
-
Thanks man
can you please help me with the Following one
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|