|
Update DATA Set Memeber_Id = substring(Memeber_Id,2,len(Memeber_Id-1))
|
|
|
|
|
Change it to:
Update tablename Set Memeber_Id = substring(Memeber_Id,2,len(Memeber_Id)-1)
len(Memeber_Id)-1 not len(Memeber_Id-1)
|
|
|
|
|
Thank you vety much man .Its working now.
How erver its trancating all the numbers.Its not removing 0 only.
It removes someother digits on the numbers
thanks
|
|
|
|
|
Yes
this query removes the 1st character whatever it is.
If you want to remove the first character only if it starts with '0' then add this where clause to the query:
Where Memeber_Id like '0%'
|
|
|
|
|
Thanks very much for your help.You know what i wanted to check who run a script on my database and at what time.
Where will i check that on SQL2005 database using athe admin login?
Thank you very very much.
|
|
|
|
|
You can use SQL profiler to display all queries running with some info about them.
Note that this will may cause performance issues.
|
|
|
|
|
thank you very much,
How will i open the activites on SQL profiler?
Thanks
|
|
|
|
|
|
Thank you very much.I really appreciate it.
|
|
|
|
|
1. Vendor Registration master
• Vendors are register as per the currency (INR, Forex)
• If the currency is INR, then vendors for airline, visa, mediclaim, miscellaneous, POE gets added
• If the Forex currency selected then the vendors are register as per the country
• In case of Forex currency, for the single vendor they can select the multiple currency
This master i suppose to create Please advice me on the side of Database Designing
Please create Supplier_master for this
pl suggest me the fields and there data types.
Thanks in Advance.
|
|
|
|
|
soniasan wrote: Please create Supplier_master for this
We're not here to do your homework for you. Read the discussion forum guidelines.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Dear Paul
Thanks for your replay.
I am in intention to give any Homework to u.
I am just want to ask that what fields and on what fields
i suppose to put constraint.
i create supplier_idand currency as primary key
so is it all wright or do u have any suggestion on this
CREATE TABLE [dbo].[Supplier_Mst] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Supplier_id] [int] NOT NULL ,
[currency] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[supplier_type_id] [int] NOT NULL ,
[Country_id] [int] NOT NULL ,
[supplier_name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[supplier_add] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[contact_person] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[phone1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[phone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[fax] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
|
|
|
|
|
hi ...
is it possible to show the values in the column as a header for another table
..need query for that...
ex:
in emp table.. i got emp names.. and i want to put all the names in the header for another table..
thanks
mahen
|
|
|
|
|
You may want to look around on Oracle's site.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi,
how (if at all) is it possible to do something like this...
I want to select a column value from the database but i want to make sure that what i select, has a fixed length with spaces in the front of it if it is to short... example.
....Test1<br />
.....Test<br />
.LongTest
Each "." represents a space.
(so the select statement should be something like: SELECT (BlankSpace for x amount... where x amount would be (in my example: 9) - Len(TestColumnValue) + TestColumnValue) ) This will ensure that the selected values are right aligned and all the same length...
Is this possible and how if it is? I hope i explained what i need clearly... please let me know if you need more info.
Thank you in advance.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
hi
try this
select right(space(20) + rtrim(FIELDNAME), 20)
from TABLENAME
Regards
Joe
|
|
|
|
|
thank you... this looks promissing.
I am playing around with this now.
thank you for your time
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
I believe this was already dealt over here[^]
Once you have mastered the ability to turn yourself invisible at will, and to deflect bullets with your hair, you will be ready to come back here to the lounge and post programming questions.Only at this point will you be able to dodge the fireballs that are going to come your way. - Pete O'Hanlon
|
|
|
|
|
i though i had it figured out too...
But now with the space() function... i can get the result i am looking for without using variables.
Thank you for your time
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Sorry....
But what does the right( do (i used select right(space(20) + 'TEST', 25) ? i tested the also with select left(space(20) + 'TEST', 25) ... i did not notice a difference.
What does the left or right do in this section?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
select replicate('.', 9 - len(ltrim(rtrim(TestColumnValue)))) + ltrim(rtrim(TestColumnValue))
from YourTable
and this will left prefix with '.' character your field.
Nuclear launch detected
|
|
|
|
|
HI friends..
i want to display row wise values in the oracle table..TO THE columnwise of the DB GRID IN DELPHI..(ROWWISE VALUES TO COLUMNWISE... FROM ORACLE TABLE TO DBGRID IN DELPHI)
THANKS
MAHEN
|
|
|
|
|
This site deals with Microsoft technologies. You would be better off asking your question on a Delphi site.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi ,
i have got a datagridview object in my form..When i click a cell i wanna know if dg.currentrow[5].cell.value == null or not . . . . . .
thanx ...
|
|
|
|
|
tr_thorn wrote: When i click a cell i wanna know if dg.currentrow[5].cell.value == null or not
Try Convert.IsDBNull(dg.currentrow[5].cell.value) .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|