Want To Colunm
Mar 15, 2007
Afternoon all,
I have a colunm sName(nVarChar(255) which has first name and second name in it and is divended with a ",". Can somebody show me to put these in there own colunm sFirstName and sSecondName.
Very Kind regards.
View 1 Replies
Mar 18, 2008
Hello
Can some body help me in performing this?
I want to move the data from Colunm Value to Colunm CPublicID whenever CCField = 'PublicID' as shown below in green color( Without using Cursor or While loops)
CPubID ------------CCTable ------------CCField------------ DWTable------------ DWField ------------Value
101 XYZ Type Dimension Flag Related
101 XYZ ClaimAssocType Dimension Key Related
101 XYZ ID Dimension Flag 1890
101 XYZ ID Dimension Key 1890
101 XYZ PublicID Dimension Flag 103
101 XYZ PublicID Dimension Key 103
101 XYZ PublicID Dimension Flag 230
101 XYZ PublicID Dimension Key 230
101 XYZ PublicID Dimension Flag 5691
101 XYZ PublicID Dimension Key 5691
CPubID ------------CCTable ------------CCField------------ DWTable------------ DWField ------------Value
101 XYZ Type Dimension Flag Related
101 XYZ ClaimAssocType Dimension Key Related
101 XYZ ID Dimension Flag 1890
101 XYZ ID Dimension Key 1890
103 XYZ PublicID Dimension Flag 103
103 XYZ PublicID Dimension Key 103
230 XYZ PublicID Dimension Flag 230
230 XYZ PublicID Dimension Key 230
5691 XYZ PublicID Dimension Flag 5691
5691 XYZ PublicID Dimension Key 5691
Also , I need to know the best practice to perform the below process. Which of them is advisable?
I have a table, say as above, which has lots of data, say 100,000 records. I need to look at each row and perform certain updates/ trasnformation to a colunm (Value). I aslo, need to hold the old colunm. I came up with two method
Process A) Clone the table. So I have table2 which is a copy of table1. Read the Table1, update / trasnfored the Table2
Table1 Colunm(Value) will have Old values and table 2 colunm(Value) will have transformed values
Process B) Clone the Colunm. So I have a colunm Value and its clone Value2. Read the table and value for Colunm Value and Update the Value2.
I am using process A. because I beleive , process B, reading and updating same table make sthe entire process slow.
Please advice on th ebest industrial practice of doing this.
Thanks in advance for all the help
View 5 Replies
View Related
Nov 13, 2007
Hello All
I want to creat a colunm from two colunms in a specific format
COL1 COL2 COL3
123456 01-10-2007 12070001 ( 12: From First two digit of Col1, 07 from the year of colunm2 and 0001: if combination 1207 is first else increment)
125647 01-11-2005 12050001
126756 12-25-2007 12070002 (* here since combination of 1207 is repeating it gets increment to 0002)
Can somebody help me please
View 8 Replies
View Related
Jun 15, 2006
hi
i wanted to crete an extra colunm when i retrive a set of rows...
the date colunm must show the current date eg 15/06/2006
currently im writing it as follows
select cost, '15/06/2006' as CDate
from prices
as you can see this is static date i need the date to be current whenever the query is done.
View 4 Replies
View Related
Apr 25, 2007
Afternoon all.
I have a table which has a column with has been inserting incorrect data, here is an example. Column name is description and table name is tblClientUsage:
[companyname]: 288bsl | | 13/03/2007
[companyname]: 288asl | | 08/03/2007
[companyname]: RES04sl | | 19/02/2004
[companyname]: RES01sl | | 19/02/2004
[companyname]: AAsl | | 31/12/2005
[companyname]: 652Asl | | 05/02/2007
[companyname]: GAZ1sl | | 20/03/2007
[companyname]: AAsl | | 31/12/1999
[companyname]: 363asl | | 20/01/2007
[companyname]: 288b1sl | | 02/11/2006
[companyname]: 288bsl | | 02/11/2006
Now what has been happening is that is has not been putting the company name in the column, just the text companyname. Now i have a table which has the company name and company id, i can easily join the two tables together but how can i replace just the companyname text in the description column with leaving the text after.
Any help would be great
View 3 Replies
View Related
May 22, 2006
When I submit a sql :
select * from view from column=''
the table is a view point to oracle table with ole db provider for oracle
In mssql2000, the result return rows which containing a space ' '
However, in mssql2005, the result return no rows .
Any advise on it?
View 6 Replies
View Related