Coverting Mixed Case Data To UPPERCASE

Jan 28, 2004

I am trying to convert all my client first and last names in my table to uppercase. They are currently listed as mixed case. Also I wanted to know what is the best way to force the data to UPPERCASE hwen a end user tries to insert or update the clients name. I am thinking about trying a trigger, but I am unsure how to set it up. Thanks for all the help.

View 4 Replies


ADVERTISEMENT

Convert To Uppercase The Data In Table

Apr 9, 2008

Hi

I am trying to output the data in the table to uppercase. I am using bcp to output as text file.Any possible solution to convert the data to uppercase from the table.Any tsql code for this


Thanks in advance

View 4 Replies View Related

Display Data First Letter Uppercase Rest Lowercase

Sep 19, 2006

I know you are able to display data all uppercase or all lowercase, but how do you display it First letter capital rest lower. Like a First or Last name?

View 3 Replies View Related

Data Mixed Up After Update

Apr 12, 2005

Hi!
I have quite strange problem, that I haven't seen before.
When I use update command:
UPDATE categorys SET banner_valid= '0', section_id= '1', main_cat_default= '0', banner= '', b_link= '', external_text= 'NÄ?kotnes parks ', in_frontpage= '1', name = '100. pants' WHERE (id = 130)
Then the field EXTERNAL_TEXT should have value NÄ?kotnes parks but instead of this it makes it Nakotnes parks.
I changed collation to Latvian and this did not work.
But!!! When I open Enterprise manager and just type in NÄ?kotnes parks  and save it then it is ok, but it does not work with Update/add script
Any help or ideas???

View 3 Replies View Related

Coverting T-sql To Pl/sql

Oct 14, 2004

hi,

i am trying to migrate from sql 2000 to oracle,

i am using migration workbench from oracle for this,

how ever, there are errors.

How do i take care of converting all the T-SQL procedures to Pl/SQL

thanks,



---ggupta

View 3 Replies View Related

Ref: Stored Procedures, Mixed Data Type In Sql Command

Mar 20, 2006

Su writes "I'm trying to use a stored procedure to dynamically update a table whenever other staff in other departments update their do any changes to their databaseds. and thanks for your web site taught me how to pass table names as parameters. But I still have problems withe sql command. You have an example in your article ('dynamic sql 2'), showing how to do a sql SELECTION using a table name and a local variable. But the sql command only use a local variable of varchar type. I'm trying to do INSERT with local variables with different data types. For example:

CREATE PROCEDURE KPISU_F_TotalByF
@inputT_From varchar(10),
@inputT_To varchar(10),
@TableName varchar(1000)
AS
-----------------------------------------------------
--------input variable-------------------------------
DECLARE @inputTerm_From varchar(10),
@inputTerm_To varchar(10),
@sql_empty varchar(2000),
@sql_refresh varchar(2000)
----------------------------------------------------
IF EXISTS (select * from tempdb.dbo.sysobjects
where id LIKE object_id('tempdb..#tmpOTLTotalByF'))
DROP TABLE #tmpOTLTotalByF

CREATE TABLE #tmpOTLTotalByF (Faculty varchar(50),Term_From varchar(10), Total_G12 int, Total_G3 int, Total_G4 int, Total_Faculty int)

DECLARE @iFaculty varchar(50),
@iTerm_From varchar(10),
@iTotal_G12 int,
@iTotal_G3 int,
@iTotal_G4 int,
@iTotal_Faculty int

SET @iTotal_Faculty = 0
SET @iTotal_G12 = 0
SET @iTotal_G3 = 0
SET @iTotal_G4 = 0

DECLARE su_OTL_F_cursor CURSOR

FOR
SELECT Faculty, Term_From, SUM(Grades_12), SUM(Grades_3), SUM(Grades_4)
FROM #tmpOTLTotalByFaculty
GROUP BY Faculty, Term_From

OPEN su_OTL_F_cursor

FETCH NEXT FROM su_OTL_F_cursor INTO @iFaculty, @iTerm_From, @iTotal_G12, @iTotal_G3, @iTotal_G4

WHILE @@FETCH_STATUS = 0
BEGIN

SELECT @sql_refresh = 'INSERT '
SELECT @sql_refresh = @sql_refresh + @TableName
SELECT @sql_refresh = @sql_refresh + ' VALUES (' + @iFaculty + ', ' + @iTerm_From + ', ' + @iTotal_G12 + ', ' + @iTarget_12 + ', ' + @iTotal_G3 + ', ' + @iTarget_3 + ', ' + @iTotal_G4 + ', ' + @iTarget_4 + ', ' + @iTotal_Faculty + ')'

SET @iTotal_Faculty = 0

SET @iTotal_Faculty = @iTotal_G12 + @iTotal_G3 + @iTotal_G4

INSERT #tmpOTLTotalByF VALUES (@iFaculty, @iTerm_From, @iTotal_G12, @iTotal_G3, @iTotal_G4, @iTotal_Faculty)

Exec ( @sql_refresh)

FETCH NEXT FROM su_OTL_F_cursor INTO @iFaculty, @iTerm_From, @iTotal_G12, @iTotal_G3, @iTotal_G4
END

CLOSE su_OTL_F_cursor -----line 222
DEALLOCATE su_OTL_F_cursor

CLOSE su_OTL_T_cursor -----line 63
DEALLOCATE su_OTL_T_cursor

SELECT * FROM #tmpOTLTotalByF ORDER BY Faculty

SELECT * FROM KPISU_F_OTLTotalByF05 ORDER BY Faculty

GO

EXECUTE KPISU_F_TotalByF '2005', '2006', 'KPISU_F_OTLTotalByF05'
GO

----------------------------------------------------------

I got the following error message:

Server: Msg 245, Level 16, State 1, Procedure KPISU_F_TotalByF, Line 256
Syntax error converting the varchar value 'INSERT KPISU_F_OTLTotalByF06 VALUES (14-19 Academy, 2005, ' to a column of data type int.
-----------------------------------------------------------

I guess I could change all the columns in the table to data type of varchar. But are there any other way to solve this problem?

Many thanks.

Su"

View 1 Replies View Related

Coverting To Date Problem

Aug 19, 2007

SELECT DISTINCT   CAST(YEAR(classdate) AS varchar(4))  + '/' + CAST(MONTH(classdate) AS varchar(2)) as ok ,{fn MONTH(dbo.classgiven.classdate)}  as monthcode FROM  dbo.classT INNER JOIN dbo.classgiven ON dbo.classT.classcode = dbo.classgiven.classcode WHERE (dbo.classT.discount = '-1') AND  (dbo.classT.coned IS NOT NULL) order by 1", conNorthwind)
 
hello how do convert "CAST(YEAR(classdate) AS varchar(4))  + '/1/' + CAST(MONTH(classdate) AS varchar(2)) as ok"  to a date in my sql statement?
so that it comes out as MM/DD/YYYY
thank you all
agian  "OK" has to come out as a date..thanks
 
 
 

View 2 Replies View Related

Help Coverting A Stored Procedure To A View

Aug 13, 2007

Can someone help me convert this stored procedure to a view? It is using two UDFs.
I appreciate this very much!@Start datetime,
@End datetime

AS

SELECT

C.Client_ID, (SUM(COALESCE(PR.AmountPaid,0))+ SUM(COALESCE(SC.SC_AMOUNT,0))) AS SumOfpmts, C.OrgName, C.FirstName, C.LastName, C.Sal1, C.Sal2, C.Sal3, A.Address, A.Address_Line2, A.City, A.State, A.Zip, A.Country, C.Title,
dbo

.getLevel(SUM(COALESCE(PR.AmountPaid,0))+ SUM(COALESCE(SC.SC_AMOUNT,0))) as pmtLevel,
dbo

.getLevelDesc(SUM(COALESCE(PR.AmountPaid,0))+ SUM(COALESCE(SC.SC_AMOUNT,0))) as Description
FROM

tblClients C INNER JOIN
tblPMTs P

ON C.Client_ID = P.Client_ID INNER JOIN
tblPMTReceipts PR

ON P.PMT_ID = PR.PMT_ID INNER JOIN
tblClientAddresses A

ON C.Client_ID = A.Client_ID LEFT OUTER JOIN
tblSoftCreditsPMTS SC

ON C.Client_ID = SC.SC_Client_ID

WHERE

(PR.PaymentDate BETWEEN @Start AND @End)
GROUP

BY C.Client_ID, C.OrgName, C.FirstName, C.LastName, C.Sal1, C.Sal2, C.Sal3, A.Address, A.Address_Line2, A.City, A.State, A.Zip, A.Country, C.Title

ORDER

BY pmtLevel
RETURN 

View 3 Replies View Related

Integration Services :: Mixed Data Types In Excel Column To OEDB Destination

May 19, 2015

I am importing the Source: Excel 2007 (xlsx) to Destination:SQL Server DB Table..

One field had 739 records in that First 700 had  General (i.e., Numeric ) last 39 had General(Alpha Numeric)

CT
-----
4564
45645
4548
0125
'''''
'''' 700 rows
ADF456
ADER156
DER1234
''''''
'''''39 rows

So I applied

:: REGEDIT::: 
HKEY_LOCAL_MACHINESoftwareMicrosoftOffice14.0Access Connectivity EngineEnginesExcelTypeGuessRows ::TypeGuessRows value to zero (0)
IMEX=1
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:destination.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES;IMEX=1";

But SQL Table Last 39 Records Dumped as NULL  whichever is Alphanumeric. Why? Dynamically How Can I import without doing Text to column in Excel on that column ?

View 4 Replies View Related

To Uppercase We Go

Dec 11, 2007

In sql2005 how can I update a table in my db to give me all uppercase. I have never created a sp but would like to try to do this so can someone point me in the right direction. If a select/update statement is better then please give me suggestion that way also. Thanks in advance
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>





1445009
MELVIN
CALVIN
A
000142718
12/11/2007 6:44:00 AM
40
503


5831
mark
lama
A
000005831
12/11/2007 7:51:00 AM
41
503
01

8300
tito
fernandez
A
000008300
12/11/6:58:00 AM
41
503
01

2380
ANNABEL
MEZA
A
00000380
12/11/2007 8:06:00 AM
41
503
01

3697
armando
hernandez
A
000003697
12/11/2007 7:24:00 AM
41
503
01

5208
juan
guardiola
A
000005208
12/11/2007 7:29:00 AM
41
503
01

523614
JOHNNY
KELLEY
A
000143625
12/11/2007 8:00:00 AM
41
503
04

View 5 Replies View Related

Case Sensitivity When A User Enters Data Into The Database. How To Deal With Case Sensitivity.

Sep 6, 2007

I am working on a C#/asp.net web application. The application has a text box that allows a user to enter a name. The name is then saved to the database.
Before the name is saved to the database, I need to be able to check if the name already exists in the database. The problem  here is that what if the name is in the database as "JoE ScMedLap" and somoene enters the name as "Joe Schmedlap" which already exists in the database,but just differs in case.
In other words how do deal with case sensitiviy issues.

View 2 Replies View Related

Uppercase Trigger

Jul 23, 2005

How can I create a trigger that obliges UPPERCASE of a field in thedatabase?thanks

View 3 Replies View Related

Trigger To Set Names To UPPERCASE

Apr 27, 2006

I have been tinkering with triggers and have tried to build one that will format the names in two columns to UPPERCASE.

Trouble is it won't run and I don't know why, how can I accomplish this uppercase task with a trigger?

View 2 Replies View Related

Update Query Using Uppercase

Dec 30, 2004

Hi,

I have a table where the values in the Description field are all upper case. I found a script that will change all the words to UPPERCASE in the first character then LOWERCASE for the remaining until the next space is found. It will also repeat this for all words in the field.

The part I need help with is having this repeat through the entire table. Heres the code and thanks - troy


declare @input varchar(20)
declare @position int
set @input = (SELECT Description FROM tbl_ItemMast where wallysku ='10071')
set @position = 1
SET @input = Upper(substring(@input,1,1))+ LOWER(substring(@input,2,len(@input)-1))
WHILE @position < DATALENGTH(@input)
Begin
set @position = charindex(' ',@input,@position+1)
if @position = 0
goto done
SET @input = REPLACE(@input,substring(@input,@position,2),Upper(substring(@input,@position,2)))
End
DONE:
PRINT @input

View 2 Replies View Related

How Do I Get Uppercase Values Returned Only.

Jul 23, 2005

I have a table where inactive names are lower case and active names areuppercase. Note: Not my design.Anyways I want to select all names form this table where the name isuppercase. I see collate and ASCII pop up in searches but the examplesdon't seem usable in queries as much as they were for creating tablesand such.Thanks,Phil

View 5 Replies View Related

Predicate Or Key Word All In Uppercase?

Jul 12, 2006

Hi,

What is the dowside of not using all uppercase for predicates and key words?

I cannot find to see a problem beside adhering to a clean coding convention. After all I already have color coding so what would be the uppercase for?

Same question for the semicolon ; at the end of a sql block. Is that real necessary not to get in trouble sometime down the road or is it a non-issue. I find like I am now a C# guys if I use these ;

Just curious, I find tedious to switch from all upper case to normal case all the time. And not forget to type the ;

Thanks,

Philippe

View 7 Replies View Related

Convert 1st Letter To Uppercase In SQL Comand

Aug 15, 2005

Hi all!This is the problem:User enters student name, in the database, only the 1st letter is uppercase and the rest is  in Lower case.So, I want to fix this so as it is not case sensitive, i.e. the user can enter a name and it will return the recordwhether they enter it in upper or lower case.My Code:CvtUpperCase.Text = UCase(Content.Text)                //stores user's input
   Select Case OptionChoice
       Case "Student_FirstName"            MyCommand = New SqlDataAdapter("select * from [qryStudentDetails] where [qryStudentDetails].[Student_FirstName] like             '" & CvtUpperCase.Text & "'" , myConnection)
....Any ideas??

View 2 Replies View Related

Is There A Option To Change Keywords To Uppercase

Dec 10, 2007

I am always changing the Sql Query Keywords to UpperCase and formatting the T-sql.

Is there a option so that i can change the keywords to uppercase automatically in the sql 2005 management studio ?

How do most of you format the sql statements?

Please let me know it will save me and most of us like me alot of time.
Your help will be most appreciated.

Thanks in Advance

Savvy

View 6 Replies View Related

Uppercase T-sql Keyword In Query Editor

Oct 16, 2006

In Query Editor I type statements like this:



"select * from ...."



Does Query Editor support a "macro" facility where I could, via keystorke, uppercase all t-sql keywords? (so it would look like SELECT * FROM...)



TIA,

barkingdog



P.S. You think I'm lazy? I knew a programmer who was so lazy that his password was one character long!

View 7 Replies View Related

Make SQL Server Distinguish Between Uppercase And Lowercase Characters In A Stored Procedure?

May 10, 2007

I would like SQL Server 2000 to distinguish between uppercase and lowercase letters, but only within a single stored procedure. Also, at the end of the sp, I want the original collation to be restored. How will I implement this in my sp?

View 3 Replies View Related

Reporting Services :: Expression To Change All Caps To First Letter Uppercase And Rest Lowercase

Aug 1, 2015

The states in this report are all in caps TEXAS, CALIFORNIA, etc.. Is there a way to use expressions to only have the first letter in uppercase and rest in lowercase?

View 3 Replies View Related

More Trusted Vb Mixed

Aug 16, 2005

If I install SQL Server using a certain Windows Login, does that login assume some sort of "sa" alias?
(I'm trying to explain the behaviour that when I login in to a server using the same username that I used when i installed the SQL Server instance, using trusted authentication, then use a database within which I haven't created any users, I seem to get full permissions, as if I had gone in as "sa")

View 1 Replies View Related

Mixed Authentication

Aug 26, 2005

In the scenario where you are installing MSDE/SQL Server at a customer site (not your own) is this true:

Assuming the customer has a (Windows) login with admin rights (or is a member of the admins group) over the PC which the server was installed on, there is no way of locking the customer out of any part of the SQL Server installation and its databases as Mixed Authentication (which you can't turn off) will always allow members of the (Windows) admins group to also be a member of the SQL Server admins group???

View 3 Replies View Related

Mixed Authentication

Jul 20, 2005

Hi All,We have started to get the strangest errors with our SQL Server. We useWindows and SQL Server authentication, and have done successfully forthe last year or so. However last week i had trouble connecting to theenterprise manager with my domain credentials. Users connecting to QueryAnalyser have no problems when using their SQL Server logins, the issueonly seems to arrise when a Domain account is provided forauthentication. If we reboot the server all is well for about 1 - 2hours and then we loose the Domain credentials again. Even SQL Agentfails to work when stated with the DOMAINAdministrator account!As i said this has worked for a long time, and we have not made anychanges to the Domain or installed any patches for any of the servers.The error messages normally involve something along the lines of "NoUser 'NULL' blah blah" and "No Trusted SQL Server". We also have anexcel report that is failing with the SQL Server error number 18452. Ihave looked this up on MSDN, and this seems to fall in to the samecategory as our other errors.Any Ideas?We can't reboot the server every 2 hours!*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 1 Replies View Related

Mixed Mode

May 31, 2006

After installing SQL Server 2005 I found that I inadvertantly used Windows Authentication Mode and I would like to change to Mixed Mode (Windows Authentication and SQL Server Authentication) - what is the best way to do this? In Microsoft SQL Server 2000 you could simply go into Enterprise Manager, edit the SQL Server Registration Properties, edit the Properties of the SQL Server and edit the Properties of the SQL Server Agent.

View 1 Replies View Related

Mixed Bag Questions (only 13)

Apr 26, 2007

Hi everyone,

Ok guys, I€™ve summarized doubts regarding SSIS as well as odd behaviour that sometimes I suffer for my lack of knowledge or for other reasons.
So this way, I€™m a pain and bore individual only one time€¦

Question 1:

When you have a ForEach container, i.e using as enumeraton ADO and you are debugging and seeing how is going everything, whats tasks are executing and so on, you never knows if those that were in green (executed succesfully) now are executing again or not.
Well, I€™ll try to explain better: In every iteration of the loop, tasks previously executed keep its colour (green) instead of turn into white.

Question 2:

Parameter Size property is a new property for Sql Task when you have installed sp2. Well, what is it for really? I mean I€™ve got some .dtsx with Sql Tasks and its values are simply -1

Question 3:

When you€™re debugging a dtsx you have in the bottom locals showing you variables and so on. Problems come when you have more than 40 variables€¦ is there any search tool? Ok, you can use

Question 4:

Outline for the tasks is lost all the time. What a nuisance! Concretely it happens in workstations running either sp1 or sp2. Amazingly it works fine in a server (2003). Memory is not related, I€™m afraid, in all the scenarios 2Gb.

Question 5:

Is it possible disallow math case for variables?
Sometimes when you€™re using lots of variables, it€™s easy commit errors when you write code.

Question 6:

Assemblies 1.0/1.1 will be allow in VSA in a future??

Question 7:

Is it possible to change the scope for a variable in run-time? Devious question, I admit€¦

Question 8:

When you€™re writing a Script Task you can export the script into VB extension and then be imported from a project or whatever.
What does make sense?

Question 9:

ScriptTask_32dcba2feae9428386d768f38922e162 (that€™s an example) is really stored anywhere? (When you save a script task inside the IDE)
Root NameSpace is too symbolic??

Question 10:

I€™m developing against Windows 2003 english version. The whole Sql25k too. No spanish at all but sometimes I receive spanish messages related with SSIS.
I don€™t understand how it can be.
Nothing to do with for the fact I€™m using Terminal Server, I guess.

Question 11:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1518311&SiteID=1&mode=1

Question 12:

In a foreseeable future C# will be welcomed to SSIS?

Question 13:

Is it true that there is a separate Framework 2.0 for SSIS?



Thanks indeed for the patience!!!

View 14 Replies View Related

Arithmatic With &#39;mixed&#39; Strings

Sep 5, 2001

Is it possible to convet a string with characters and numbers to an all numeric value (e.g. '010-112d3') and then perform arithmatic on the converted value?


Here is what I need to do:
given the original value of: 01011201
I need to order a result set by asc order of the difference between the original and each individual record.

If this was all numeric I would simply:
select...,(01011201 - column1) as difference from table1 order
by difference

BUT my recordset looks like this [010-112d3, 01011202, 0a511345...] so I get
I get arithmatic overflow errors (due to the characters). Ive tried casting as numeric and binary and even converting the string to ascii value but that only works for single characters. Any Ideas would be greatly appreciated.

BTW, This search will be the most common hit on the database so a cursor is not really an option.

Thanks,
DaLoonster

View 2 Replies View Related

Mixed Authentication Mode

Jun 7, 2007

Hello



I would like to set 'SQL Server and Windows Authentication mode' of Sql Server 2005 so when user connects to Server he must supply username and password. Here are steps I make :



1. Open Microsoft SQL ServerManagement Studio Express
2. In Object Explorer right click on first (Server) node
3. Select 'Properties'
4. Select Page 'Security'
5. set 'Server authentication' to 'SQL Server and Windows Authentication mode'
6. press OK
7. in popup window fill password ******** and press OK
8. get error message ''operation is not valid due to the current state of the object. (Microsoft.SqlServer.Express.SqlManagerUI)

How correctly to set above Server mode ?

Why I get the error message and how to solve it ?


Thank you

Yosef Fishov

View 2 Replies View Related

Sql Server Mixed Mode

Jun 7, 2007

Hello everybody



I program in C# with SQL Server 2005. I need to connect to Server in security mode.

In connection string I supply
UserID = myuser
Password = mypassword
Persist Security Info = True



In Server I set mixed authentication mode,create login 'mylogin' with password = mypassword
after that in my database I create user with username = myuser and loginName = mylogin



There are two problems :

1. in login creation after I fill password, close window and open it again there is old (default) password
but not my password
2. Application fails to connect to DB





How to solve these problems ?

Thank you
Yosef Fishov

View 3 Replies View Related

Questions On A Mixed-mode Authentication

Aug 17, 2007

First post, so greetings!I've been using ASP.NET 2 authentication from an MS SQL 2k5 database now in the web application for my company's customer accounts (file serving, custom webreports, etc).  There is currently no support for employees through this web app, but in our plan to go paperless it's become of interest to let the employees access much of their information through the same web portal.  The catch is, I'd rather not make them have to use two accounts (one for their domain authentication and one for their web authentication).  It's already taken a lot of conditioning to get them to memorize a single username and password.So what I really need is the single Login.aspx page to accept both ASP.NET logins and Domain digest logins, and the Domain digest login needs to be HTTP based (not named pipes).  Is this possible at all, and if so, is it possible without making an isapi filter?  After all, Microsoft Office Outlook Web Access is served by the exchange server and accepts active directory passwords.  So how could I do authentication in this way, and if so, is it possible to have the Outlook Web Access form be accessible from the same session as that of my web server? Thanks, I surely hope someone can help. . . -Brandon  

View 1 Replies View Related

Mixed Chart Types In SSRS

Feb 8, 2008

Hi,

I am trying to create a graph that consists of a bar chart and line graph - both to appear on the same graph.

They will show different information, but will essentially come from the same dataset.

So far I have not been able to achieve this and it would seem that you cannot mix chart types. This is very disappointing given the plaudits associated with this product.

Can anyone restore my faith in this product by telling me that the above is possible and, if so, how do I go about it.

Thanks very much.
Lee.

View 1 Replies View Related

Changing From Windows To Mixed Authentication

Sep 13, 2005

Hi AllI am trying to switch from Windows to Mixed mode authentication on SQLServer 2000. I am right-clicking the server instance in EnterpriseManager and selecting the correct option from the Security tab.Unfortunately, the change I make does not persist when I click OK. Iget no error message, but when I re-open the server properties, theoption has returned to being Windows authentication.Any ideas?Thanks,Kulgan.

View 4 Replies View Related

Retrieve Next Lowest Number In Mixed Set

Oct 4, 2007

Let's say I have a result set (records) containing numbers such as:01239162145100101102103104105106How might someone write a procedure to get the next lowest number inthis sequence? In this case it would be: 4. Some combination ofSelect, Min & When, I am sure, but it escapes me at the moment.Thoughts? Thanks...

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved