Showing posts with label store. Show all posts
Showing posts with label store. Show all posts

Saturday, February 25, 2012

Add Hindi Language Data In Sql Server

I want to store data in hindi language. I have taken nvarchar as datatype for this column. When i store data from a client application running on browser ascii value for corresponding data is stored in the database. I want hindi font should be displayed when i view the database in enterprise manager not like this ???Might be a silly question, but this held me up for a couple of days:

Have you installed the correct fonts/character sets on your client?|||Also, is the client booting with the Locale and Regional settings that support this character set?

Add Foreign Key Constraint in filegroup

Hi,
I'd like to create a foreign key constraint and store it in a different
filegroup than "PRIMARY"
For this, I've created a new filegroup named "INDEX"
This is my script :
ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
CONSTRAINT [FK_T_FILE_IDFOL_T_FOLDER] FOREIGN KEY
(
[FIL_IDFOLDER]
) REFERENCES [dbo].[T_FOLDER] (
[FOL_IDFOLDER]
) ON DELETE CASCADE
ON [INDEX]
GO
And it doesn't work !
But what is very strange, is that I can create a primary key constraint
correctly on this filegroup :
ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
CONSTRAINT [PK_T_FILE] PRIMARY KEY CLUSTERED
(
[FIL_IDFILE]
) ON [INDEX]
GO
And this works !
It would be great if someone can telle me where my error is !
ThanxFilegroups are containers for storing data. Data are either data pages or in
dex pages. The reason
you can specify a filegroup when you define a primary key is that it automat
ically creates an index
for you,. so the file group you specify defines where that index will be sto
red. A foreign key
doesn't come with an index.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<jerome.avoustin@.gmail.com> wrote in message
news:1137404237.380973.84080@.g43g2000cwa.googlegroups.com...
> Hi,
> I'd like to create a foreign key constraint and store it in a different
> filegroup than "PRIMARY"
> For this, I've created a new filegroup named "INDEX"
> This is my script :
> ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
> CONSTRAINT [FK_T_FILE_IDFOL_T_FOLDER] FOREIGN KEY
> (
> [FIL_IDFOLDER]
> ) REFERENCES [dbo].[T_FOLDER] (
> [FOL_IDFOLDER]
> ) ON DELETE CASCADE
> ON [INDEX]
> GO
> And it doesn't work !
> But what is very strange, is that I can create a primary key constraint
> correctly on this filegroup :
> ALTER TABLE [dbo].[T_FILE] WITH NOCHECK ADD
> CONSTRAINT [PK_T_FILE] PRIMARY KEY CLUSTERED
> (
> [FIL_IDFILE]
> ) ON [INDEX]
> GO
> And this works !
> It would be great if someone can telle me where my error is !
> Thanx
>

Friday, February 24, 2012

add Date and Time In Non english format(Farsi or arabic)

Please Help me
I want Store date and time in sql server tables but in non english format.
For example Arabic or farsi
How can i Do?
Help meeeeeeeee
ThanksI am not sure which format you want - but there are 2 Kuwaiti formats:

Style Format
130 dd mon yyyy hh:mi:ss:mmmAM
131 dd/mon/yy hh:mi:ss:mmmAM

You can alter your datetime data using the convert function. Look at convert in bol.|||Date and time are not stored in any "format" in the database. They are stored as numeric values indicating the days elapsed since a fixed point in time. What you are looking for is a way to display the datetime value in a particular format. You can use the convert function given by rnealejr when outputing your results, but generally issues of data-formatting and display should be handled by your user interface or reporting tool.

blindman