|
I'm using SQL Server 2005.
Is there any function for converting a string to lower case except for the first one that should be upper case?
_____________________________
...and justice for all
APe
|
|
|
|
|
select upper(left(MyColumn,1)) + lower(substring(MyColumn, 2, len(MyColumn)))
from MyTable
|
|
|
|
|
Just be aware that there are a few oddball words like O'Daniel or McDonald etc that will need to have special consideration when proper casing text.
CleAkO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Hi,
i use a Firebird Embedded DB for my App and would like create all the tables etc. without typing 100 SQL Statements.
Does anybody of you know any tool which can do that? I just found some for the firebird SERVER not for the embedded one.
Thank you for helping.
|
|
|
|
|
I use IBExpert[^]
If you scroll to the bottom of the page, you'll find a link to the free Personal Edition.
|
|
|
|
|
Thank you, it works for me
For everyone else, if you use this tool on FB Embedded and you are promted for username and password but you never used it because you don't had to, use sysadmin / masterkey. That's the standard.
|
|
|
|
|
i want to execute the following string
insert into test values 'h"ll'
but it gives some error. which escape i should use,,,
please help me. any advise will be appreciated.
thanks in advance
sebastian
|
|
|
|
|
Sebastian T Xavier wrote: it gives some error
Be specific! What is the error message?
|
|
|
|
|
Incorrect syntax near 'h"ll'.
this is the error message, this is because of the " inside the string. how will we insert such strings into database.
thanks
sebastian
|
|
|
|
|
Try this:
insert into test values ('h"ll')
|
|
|
|
|
thanks
but this will not solve the problem.
i got it
thanks once again
sebastian
|
|
|
|
|
Sebastian T Xavier wrote: but this will not solve the problem
Yes, it does solve the problem. If it does not solve your problem then there is some missing information.
|
|
|
|
|
I've got 2 tables:
Province and Client
When I link Province with client i get the ff message
'Province' table saved successfully
'Client' table
- Unable to create relationship 'FK_Client_Province'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Client_Province". The conflict occurred in database "test", table "dbo.Province", column 'Province'.
karabo
|
|
|
|
|
not got your query in full.
can you please give the sql statement reselted in this error. along with the 1. parent able and chield table
2. primary keys on the tables
however what i under stook is province is parent and client is chield
if so one column like provienceID should be primary key in province table
and in client table's provienceID can refer to provience table
Regards
KP
|
|
|
|
|
Does SQL Server have an autonumber datatype which will increment when adding record
Karabo Mekgwe
|
|
|
|
|
YES.
CREATE TABLE tblA(
AutoID decimal(18, 0) NOT NULL IDENTITY (1, 1),
Col2 varchar(10)
)
|
|
|
|
|
yes that s IDENTITY
See the example :
CREATE TABLE Emp (EMPID int IDENTITY (1, 1) NOT NULL ,EMPNAME VARCHAR(20))
Above this examble Identity is like an auto increment.
The Parameters (1,1) represents Start Number, Increment Number
this example starts 1 and next incremented by 1
RK
RK
RK
|
|
|
|
|
yes that s IDENTITY
See the example :
CREATE TABLE Emp (EMPID int IDENTITY (1, 1) NOT NULL ,EMPNAME VARCHAR(20))
Above this examble Identity is like an auto increment.
The Parameters (1,1) represents Start Number, Increment Number
this example starts 1 and next incremented by 1
RK
|
|
|
|
|
Hi, sometimes when I execute a procedure, it quits in no time:
echo "execute procedure ro_main_tp_oc('ATS','EY','N')" | dbaccess prds
Database selected.
Routine executed.
Database closed.
I heard it's because some procedure was blocked and locks other procedures. How shall I check and resolve it?
I am using HP unix, informix.
Thanks!
lantianman
|
|
|
|
|
There aren't very many Informix guys on this forum - its mostly SQL Server, Access, Oracle and MySQL.
I would try using dbaccess to run the command interactively to see if you get any better clue about what is happening.
Blocking and locks would normally result in a procedure being really slow. If there is a problem then I would guess that the procedure contains:- A "set lock mode" or "set current lock timeout" statement that tells Informix to throw an error if it encounters a locked record (or the database has been configured with a "locktimeout" parameter).
- An update/delete statement or a "for-update" cursor statement.
- If no error message is being displayed then I would expect that the resulting timeout error is being swallowed a "whenever error" clause.
If there was a problem with blocking then I would have expected an error message to be displayed (especially given that Informix is such a mature product). Are you sure that the procedure is having problems?
Hope that helps. I haven't done Informix for a reeeeeeally long time.
Andy
|
|
|
|
|
Thank you for your reply! Seems the problem has gone after I wait for some time...
|
|
|
|
|
sir,
I have a table which is having duplicate and some distinct records. Please can anybody please tell me the SQL-Server-2000 query to get only the duplicate records.
Means I dont need those records, which are not duplicate, but I need to print only those records which are duplicate. Thank you.
Regards,
Mohd. Abdul Aleem,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
let us take a table TBL1 with columns col1, col2, col3 for example
the query for fetchig is ...
SELECT col1, col2, col3 FROM TBL1 GROUP BY col1, col2, col3 HAVING count(*) > 1
|
|
|
|
|
Its not giving any records in SQL Server. Pls. give me some thing, which works in SQL Server. Thank you.
Regards,
Mohd. Abdul Aleem,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I've tested the query on SQL server 2000
i'm getting proper output fetching proper data
i.e. i've a table in that new columns have duplicate data and other unique
when i include only duplicate data columns in the table i'm getting those rows which is duplicated that too when used ">10" returns those having 11 or more times repeated and when used ">3" returns those repeated 4 or more times and so on.
Regards
KP
|
|
|
|