Click here to Skip to main content
15,896,118 members
Home / Discussions / Database
   

Database

 
GeneralString concatentaion on update query Pin
si_6915-Feb-08 1:16
si_6915-Feb-08 1:16 
GeneralRe: String concatentaion on update query Pin
Joe15-Feb-08 1:23
Joe15-Feb-08 1:23 
GeneralRe: String concatentaion on update query Pin
seta_yas17-Feb-08 18:19
seta_yas17-Feb-08 18:19 
Generalmonitor sql db connections Pin
Harvey Saayman14-Feb-08 22:24
Harvey Saayman14-Feb-08 22:24 
GeneralRe: monitor sql db connections Pin
Mike Dimmick14-Feb-08 23:59
Mike Dimmick14-Feb-08 23:59 
GeneralRe: monitor sql db connections Pin
Harvey Saayman15-Feb-08 0:12
Harvey Saayman15-Feb-08 0:12 
GeneralFreaky reader Error [Solved] Pin
Harvey Saayman14-Feb-08 22:22
Harvey Saayman14-Feb-08 22:22 
GeneralHelp with the Following View Pin
Vimalsoft(Pty) Ltd14-Feb-08 19:52
professionalVimalsoft(Pty) Ltd14-Feb-08 19:52 
Good Morning All

i have the Following View

<br />
ALTER VIEW [dbo].[VW_Toi_Deeds_Vuyiswa]<br />
<br />
AS<br />
<br />
SELECT ID, PROPERTY_KEY, LIS_KEY, CASE <br />
WHEN Isnumeric(substring(FUNCTION_KEY,6,4)) = 1 --If Its Numeric on last digit of the <br />
<br />
--GEOSS part(4 Digits) <br />
<br />
AND SUBSTRING(FUNCTION_KEY, 6, 1) = 0 --Making sure that there is a Digit After the Funckey,and its "0"<br />
<br />
THEN SUBSTRING(FUNCTION_KEY, 1, 5) + SUBSTRING(FUNCTION_KEY, 7, 3) <br />
<br />
ELSE FUNCTION_KEY <br />
<br />
END AS FUNCTION_KEY<br />
<br />
, TOWN_NAME, PARCEL_NUMBER, PORTION_NUMBER, FARM_NAME, REGISTRATION_DIVISION, FARM_NUMBER, FARM_PORTION,<br />
 SECTIONAL_SCHEME_NAME, SECTIONAL_SCHEME_NUMBER, SECTIONAL_SCHEME_UNIT_NUMBER, BUYER_NAME, BUYER_ID, <br />
REGISTRATION_DATE, PURCHASE_DATE, PURCHASE_PRICE, <br />
REASON_NO_PRICE, NEW_TITLE_DEED_NUMBER, OLD_TITLE_DEED_NUMBER,<br />
STATUS, SHARES,DATE_CAPTURED,HISTORY_ID<br />
FROM DEEDS.DEEDS_ADMIN.TSHWANE_OWNER_INFORMATION<br />
<br />


This View Extract Data from a tabe Tshwane_Owner_Information table, and i dont understand why the certain part of Concatinaing use substring 7,3, because the view in this case, it goes to a field named "Functionkey" and in that Fied there will be character dataype that looks like this

"GEOSS001" or "GEOSS0001" as you can see some have 4 digits after the GEOSS string other have 3, and now the First part of the String is "GEOSS"

And as you can see above its been concatinated with the Digits.

<br />
SUBSTRING(FUNCTION_KEY, 1, 5) + SUBSTRING(FUNCTION_KEY, 7, 3) <br />


ok, the First part i understand and we are Concatinating the String "GEOSS"+ Something like "0001" or "001", but now, the Substring says move to 7th Posistion and start counting 3 from the Current Posistion, dont you think it missed the Digit? is it not Supposed to be like this ?

<br />
 SUBSTRING(FUNCTION_KEY, 1, 5) + SUBSTRING(FUNCTION_KEY, 6, 4)<br />


Correct me if am Wrong, we have been unable to get some Records through this view, I did not write it, i found it there, am trying to get it fixed.



Help



Thanks

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


Generalwith,or & Pin
neoghy14-Feb-08 19:44
neoghy14-Feb-08 19:44 
Questionchecking the type Pin
Sonia Gupta14-Feb-08 19:30
Sonia Gupta14-Feb-08 19:30 
GeneralRe: checking the type Pin
GuyThiebaut14-Feb-08 22:07
professionalGuyThiebaut14-Feb-08 22:07 
GeneralIs there a way to extract a value/result when you exec a sql string Pin
littleGreenDude14-Feb-08 9:08
littleGreenDude14-Feb-08 9:08 
GeneralRe: Is there a way to extract a value/result when you exec a sql string Pin
Christian Graus14-Feb-08 13:12
protectorChristian Graus14-Feb-08 13:12 
GeneralRe: Is there a way to extract a value/result when you exec a sql string Pin
andyharman14-Feb-08 21:54
professionalandyharman14-Feb-08 21:54 
GeneralBCPutility - Unable to open BCP host data-file Pin
#realJSOP14-Feb-08 6:34
professional#realJSOP14-Feb-08 6:34 
GeneralRe: BCPutility - Unable to open BCP host data-file Pin
Mike Dimmick14-Feb-08 12:44
Mike Dimmick14-Feb-08 12:44 
GeneralRe: BCPutility - Unable to open BCP host data-file Pin
#realJSOP16-Feb-08 0:24
professional#realJSOP16-Feb-08 0:24 
GeneralUsing xp_cmdshell [SOLVED] Pin
#realJSOP14-Feb-08 4:53
professional#realJSOP14-Feb-08 4:53 
GeneralOne to Many Atomic Update Pin
Brady Kelly14-Feb-08 1:32
Brady Kelly14-Feb-08 1:32 
QuestionUpdate a datatable to database Pin
Bluebamboo14-Feb-08 1:02
Bluebamboo14-Feb-08 1:02 
GeneralRe: Update a datatable to database Pin
Joe14-Feb-08 1:27
Joe14-Feb-08 1:27 
GeneralRe: Update a datatable to database Pin
Bluebamboo14-Feb-08 4:32
Bluebamboo14-Feb-08 4:32 
GeneralRe: Update a datatable to database Pin
Joe14-Feb-08 5:30
Joe14-Feb-08 5:30 
GeneralRe: Update a datatable to database Pin
Bluebamboo14-Feb-08 8:41
Bluebamboo14-Feb-08 8:41 
GeneralRe: Update a datatable to database Pin
Joe14-Feb-08 18:48
Joe14-Feb-08 18:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.