Any option on sql server to have the reserved words converted into CAPITAL when I type it in. Like "SELECT"


View Replies


How To Apply Capital Letters But Only The First One?

Hi everyone,

As source on a Sql25k table I've got this (often):


And, as a result I'd need this (plain file):

Xxxxx Zzzzzz Yyyyy

Ok guys, with VbScript inside a DTS it's very easy, building a loop and then playing with Ucase, Left functions stuff and so on...

How could I do this using a DTSX package?? Any specialized task?

Thanks indeed for your help,

View Replies View Related

Help On Extracting Only With Three Capital Letters From The Field

Hi Everybody

I have this situation where I need to extract values from a field that satisfies this criteria...



View Replies View Related

Use Of Capital Letter N In Script

Below is from the SQL Help files on INSERT INTO

What is the N doing in this script? (...N'F2'...N'Square Feet'...)

USE AdventureWorks;
INSERT INTO Production.UnitMeasure
VALUES (N'F2', N'Square Feet', GETDATE());


View Replies View Related

First Letter Capital More Than One Word

Here is my question: Can you set this code up to do more than one word ex: I have names like Mc Donald, or Brook-Smith and the are lower case like the code states??

upper(left(client.first,1))+ lower(right(client.first,len(client.first)-1)) +' '+ upper(left(client.last,1))+ lower(right(client.last,len(client.last)-1)) As 'Full Name'

View Replies View Related

WHERE Includes All Letters


I would like to perform a procedure
which takes a string of numbers and searches for strings in a table which include all the
given numbers in any particular order. problem is i can only return strings
which include 'any' of the letters in the search string and not

this is how i perform it so far:



SELECT Phone AS [Telephone

FROM tbl_Person AS p

WHERE (p.Phone LIKE '%[' +
@IncludeNumbers + ']%')


(ive removed some unecessary bits but
this shows the basics)

As you can see currently it will return any phone numbers which contain any numbers given in the includeNumbers string, I would only like it to return phone numbers which contain all the numbers given in the includeNumbers string. is there any way to make it search for strings
which include 'all' numbers given?



View Replies View Related

Group Everything With The Same First Two Letters

I'm working on a stored procedure that works fine. I just want to make it possible for the user to be able to have a drop down list in reporting services to display the "question codes" grouped by whatever the first two digits are. for example.


instead of listing everything, i want the viewers to see this
or an alias for each of these like this:

Vet Tasks
Vet National
Survey Tasks
Survey National

any ideas, here's my current code, which is pullin up anything with the added substring part

Code Snippet
ALTER PROCEDURE [dbo].[Testing_Questions]
(@Region_Key int=null,@QuestionCode char(5))

SELECT dbo.Qry_Questions.Territory,
dbo.Qry_Questions.[Question Code],
dbo.Qry_Questions.[Response Type],
FROM dbo.Qry_Questions
INNER JOIN dbo.Qry_Sales_Group
ON dbo.Qry_Questions.sales_person_code COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.Qry_Sales_Group.SalesPerson_Purchaser_Code
AND SUBSTRING(dbo.Qry_Questions.[Question Code],0,3)=@QuestionCode


View Replies View Related

Query Column With Letters

I have a database with a zip code column. I want to flag all rows that have letters in that column (a-z). How could I construct the where clause?

Is there a better alternative to:
WHERE ZipCode LIKE '%a%' OR ZipCode LIKE '%b%' ...

View Replies View Related

Drive Letters And MDF/LDF Files...


I'm writing to ask if anyone knows whether or not MS SQL server stores in any system tables the association between a database and the drive letter/directory path where its corresponding MDF/LDF files are located.



View Replies View Related

Changing Drive Letters


I have a test server that needs the drive letters changed for the data, log and backup drives. Is there a way to make this change without reinstalling SQL Server?

Future guru in the making.

View Replies View Related

Generating Letters In SSRS

Hi. I'm looking for tutorials on how to use SSRS 2005 to generate letters in Word or PDF format from a database. We need to send letters with our company logo and some boilerplate text to a set of companies based on a SQL Server query. So the letter will look something like this, with the red areas repeating from the dataset,

[logo goes here]

123 Any St.
AnyCity, CA 90210

[today's date]

Dear [name from database],

Some boilerplate text goes here. Your Account [account number from database] is past due.


[scanned signature goes here]


View Replies View Related

Dynamic Form Letters

I would like to design a 'mail merge' type of letter, whereby some of the paragraphs will be conditional on parameters. Can anyone direct me to example of mail merger letters using reporting services?



View Replies View Related

Restoring The Master To Different Drive Letters

Can you restore the master database, running on windows server 2000, sqlserver 2000 from a backup that was taken from c: to another serverrestoring to d:?*** Sent via Developersdex ***Don't just participate in USENET...get rewarded for it!

View Replies View Related

Searching For Strings That Contain Characters Other Than Letters?


I have a table in an Access db that stores information about speech files. One of the fields in this table is called "Text" and it contains the phrase spoken in that particular speechfile.

These phrases often have characters such as the "#" sign at the end to indicate what tone of voice is used.

I am trying to create a Search where users can enter the phrase they are looking for, and will be returned the file (or combination of files) that contain this phrase.

My problem is, when I try to search for a string of text that includes the "#" I get 0 results everytime.

An example of what I am doing is this:

SELECT Speechfiles.Name FROM Speechfiles
WHERE Speechfiles.Text LIKE 'aero#'

It works fine for 'aero' or '*aero*' but whenever I try to add a character that is not a letter, it won't work.

If anyone has any ideas, I would REALLY appreciate it!!! I am completely at a loss.

Thanks so much....

View Replies View Related

First Letters Of A String To Upper Case

Ho can I convert first letters of a string to Upper Case (i.e. UNITED KINGDOM - Untited Kingdom). I have country names table which has all entries in uper case. This makes a select box very larg and unproportional.
Thanks in advance for the help.


View Replies View Related

Sorting A Table With Numbers And Letters

I have a field (varchar) in a list that contains numbers and letters. I want to sort this table but I have only two functions that will work to convert the values:

The Val function sorts the numbers in the string, but the letters are not sorted

The CStr function sorts the letters, but the numbers are not sorted

How can I sort the numbers and letters?

View Replies View Related

SELECT Only The Newest, But Based On Revised Letters

Ok here's a big one.

First I'm a big NEWBIE, so it'd be great if you can provide a little explanation as to how this should be done...

Here's what I want to do, but have no idea how to approach it.

I have a table with Quotes (table Quote) in them (for a Sale's Team). Each has a quote number (qtQN) and this number is sequencial but sometimes revised where a letter is added at the end. Like so:

111q0002B -----02/04/04
etc... ------------- etc...

The first 3 digit are company codes and pretty unimportant to this problem. As you can see, 111q0002 has three versions. A, B, and no letter. The most up to date is B. So in this list I want to list only the most up to date quotes. So the resulting list would be:


Get it? Good, cuz I have no idea how to query that... any help at all is appreciated!

I'm using MS SQL Server 2k and scripting with ASP 3.0

View Replies View Related

Problem Trying To Work With Attachments With More Than 8 Letters With Xp_readmail

Hi everybody,

I work with xp_readmail to extract attached files from mails in order to load it into my database.
All is fine BUT if my attached file name is longer than 8letters, it truncate it and I can't use reach my file from the C: Doc and settings.... emp.. anymore..

Could you HELP me PLEASE?

many thanks in advance

View Replies View Related

Full-text Search On Single Letters


I'm using SQL Server 7 SP3 with the full-text search
engine under Windows NT SP6.
Since I wanted to perform full-text search on common words
like "that", "and",... I emptied the file noise.enu (I's bad), and it worked after this modification : I could perform search on any common words without having the "The query contained only ignored words." error message... Any words except for single letters !!!
Even if the noise.enu file is emptied, single letters are
filtered by the search engine.
I've done the same thing under Windows 2000 with SQL
Server 2000, and there's no problem !?!?
Please help ! I must use SQL Server 7 on Windows NT !
Thanks in advance.


View Replies View Related

Query Help, Get Count Of Names Having Distinct Letters

here is a query


select count(d) from (select distinct left(name,9) as d from bscs where region like 'n1' and name like 'Alc_%')

what i am trying to do is to get count of the names, having distinct letters in left 9 positions and some conditions too. How to do it?

View Replies View Related

Extract Numbers Or Letters From Mixed String

Yeah, it's pretty simple. Maybe it'll help someone out.

-- USAGE: fn_extract_chars(string_to_search, 'letters' -or- 'numbers')
CREATE FUNCTION fn_extract_chars (@x varchar(128), @y char(7))
RETURNS varchar(128)
DECLARE @chars varchar(128)
DECLARE @pos int
DECLARE @action varchar(32)
SET @pos = 0
SET @chars = ''

IF @y = 'numbers' SET @action = '[0-9]'
ELSE IF @y = 'letters' SET @action = '[a-zA-Z]'

WHILE @pos < (DATALENGTH(@x) + 1)
IF PATINDEX(@action,SUBSTRING(@x, @pos, 1)) > 0
SET @chars = @chars + (SELECT SUBSTRING(@x, @pos, 1))
SET @pos = @pos + 1

View Replies View Related

Adding New Volume And Swapping Drive Letters....

Hello - I have a SQL 2000 server which has a D: drive that contains all of my databases (system and user). I am running out of space on this volume and need to migrate the contents of this volume to a larger one. My initial plan was to introduce a new volume to the server (say a K: drive). Backup all databases (of course), and then stop all SQL services. Copy all data from D: to K:. Once data is copied, swap drive letter names (D: to I: and then K: to D. Then restart SQL services. SQL should not know any better since everything was on the D: drive when it went down, and everythiing is still on the D: drive when it came back up, correct?

The other option mentioned is to detatch the databases, copy the data and then reattach them in their new locations. I understand this method, but it seems more involved (and riskier) than just renaming the drives. Does anyone have an opinion regarding these two migration methods? Thanks for your help.


View Replies View Related

Text Is Getting Cut After 1.4k Letters In Text Data Type

Hello all,
started working on a website in ASP that use mssql, i am trying to store large ammount of text, for now its just 10kk letters, the data type is set to text in the mssql db, but when i read it back from the db, i only get 7.7k letters, i know its not an ASP problem cause i print the var holding the content before storing it in the db.

my question is, is there a way to change the text length limit in mssql, or use another data type?

Gilad Darshan

EDIT: forgot its saving the html source with the style and not only the words. fixed to the right amount of letters

View Replies View Related

Copyrights 2005-15, All rights reserved