Wednesday, March 7, 2012

how import DB(arabic) file to sql server?

hi

I have a BD (paradox) file, and have to import to sql server .

i imported that to access successful, but my data not correct (my data is in Arabic and Persian) like this: ?óì? ì?????

Please help me.

this because of codepage or collation

import to sql in a field with datatype nchar (unicode) if u want to maintain arabic and farsi in same field

|||

Try to use this DTS http://www.microsoft.com/middleeast/msdn/CPDTS.aspx

How import data using DTS from Excel 2007?

Hi,

I wants to import data using DTS package from Excel 2007. I have tried this by using DSN but i'm not getting Excel 2007 types.

Please suggest me how to Connect to Excel 2007 using DTS package to import data.

Thanks!

these are the steps.

1) write click on the Database

2) select Task - ImportData

3) select microsoft Excel from the drop down list and then browse and select the file u want to import. click next.

4) then select the database, give the username and password if any to access the databse or sql server. click next.

5) select the first option, click next, click on the sheet name of the sheet u want the data from and then in the destination select the table where u wanna put the data too. Click on edit mappings and see going where it has to go .

6) click next and finsh , u can save the package for future use and just replace the file and run the package again.

Hope this helps.

Regards,

Karen

how implement multi-parameters dinamic

how can choose more than one parameter in one parameter
ejemp
id name
1 a
2 b
3 c
4 e
I would like can choice 1 and 3 and 4 and same time.
thanksThere is not a good way to do it with the default interface. (I think it's
coming with SQL 2005, though.)
Possible workarounds are:
* Build a custom user interface. See the samples that come with the
product.
* Have a text box and allow free-form entry (comma-separated). This is a
difficult one for users to get right, and works best when your input options
are integers.
With either of these, your SQL might be structured like so:
WHERE FieldName IN @.Parm
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"alf" <em_alf@.hotmail.com> wrote in message
news:ublOnDeHFHA.2744@.tk2msftngp13.phx.gbl...
> how can choose more than one parameter in one parameter
> ejemp
> id name
> 1 a
> 2 b
> 3 c
> 4 e
> I would like can choice 1 and 3 and 4 and same time.
> thanks
>

How Image Display From SqlServer To Image Control

I have learned lots of informative thing from your forums. I have little problem regarding "Display image from SQL Server on ASP.NET" I have done it and image display on my page from SQL Server. I have cleared you here I have adopt two different methods which are following for displaying picture.1.Response.BinaryWrite(rd("picture"))2.image.Save(Response.OutputStream, ImageFormat.Jpeg)but in both above methods I have faced little problem when image display on my page all other information can not display and I also want to display picture on my specific location on the page. My second question is can use any web control like "Image1" to display image from SQL Server where my pictures are stored.Hope you will help me.Thanks and regardsAftab AbbasiI think what you are asking is how to put the picture someplace on the page rather than taking the entire page. To do that, reference you image frmo an <img tag or an <asp:image tag inside an existing page. You can reference an image handler also from inside the page the same way (through an img or image tag)|||thanks for your reply do u have any example kindly post here.|||

My basic need i should tell you here...i have lots of images which is stored on SQL Server 2000 and i just want
to retrive image from SQL Server and display into specific location like (Table , Cell).

Did i use any control likeImage Controlto display my picture which is stored not on physical drive which is stored
on SQL Server.

Hope u will help me with example (if u have).

Thanks and regards.


Aftab Abbasi

|||

Hi,

There on may samples for this on the web. Here is one of them:

http://codebetter.com/blogs/eric.wise/archive/2005/05/15/63236.aspx

HTH. If this does not answer you question, please feel free to mark the post as Not Answered and post your reply. Thanks!

how if esle statement works?

hi, everybody!

I have some problems with understanding howif esle statment in sql works. I'm trying to write my owncount()-function and its not working withif else :(( I've already implemented it withcase:
select sum(case (hiredate) when (null) then 0 else 1 end) as 'Count' from emp

It's working perfect. Now I want to have the same but usingif else:
select sum(
if( hiredate is null)
begin 0 end
else 1)
as 'Count' from emp

the error message is:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'if'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '0'.

What is wrong here?

Artur:

If / else does not work within the context of a select list like this; you need to implement as your first select statement with case statement or use a where condition such as something like:

select count(*)
from emp
where hiredate is not null

|||I think you are right, its not possible to use if/esle within select statement.
Thanks!!!
|||In SQL Server, IF - Else is a control flow statement that allows you to conditionaly run blocks of T-SQL code. Case is an expression that can be used inside some statements. SQL Server does not have a CASE Statement like some other languages.|||Artur,

You can have an 'if/then/else' statement within your code, it's just that you have to put 'case when' instead of 'if'. It works exactly the same way.

Try:

select sum(case when hiredate is null then 0 else 1 end) as 'Count'
from emp

Rob

How identify locking Store procedure

:eek: I've have a lot of locks in a SQL Server, and I'd like to identify which SPs are locking what tables, I've being trying with sp_who, sp_who2 and sp_lock, so i can identify the process number, but I don't have any idea what this process is doing (which sp is running? and what command?) and which table is locked by this process, can anybody send me some querys to get this information

I'm novice in SQL Server, and I've not access to the Enterprice manager console, and I've only have priveleges to read data from the database

Thanks for your help
Alfredo:eek: I've have a lot of locks in a SQL Server, and I'd like to identify which SPs are locking what tables, I've being trying with sp_who, sp_who2 and sp_lock, so i can identify the process number, but I don't have any idea what this process is doing (which sp is running? and what command?) and which table is locked by this process, can anybody send me some querys to get this information

I'm novice in SQL Server, and I've not access to the Enterprice manager console, and I've only have priveleges to read data from the database

Thanks for your help
Alfredo

Try this link (http://vyaskn.tripod.com/fn_get_sql.htm) to see if it can help you understand what's going on. Basically, you can only see the first 255(?) characters or so of a SPID's inputbuffer unless you use this function.

However, I should note that use of this function requires that you be running SQL 2000, SP3.

Regards,

hmscott|||hmscott, many thanks for your help, but, If I understand, this procedure requires privileges to write a store procedure at the server, and I can't do that, I only have privilges to read information.

regards

Alfredo|||are you sure you have a problem? locking is part of sql. every insert, update, and delete creates a lock and there are locks of different flavors.|||I can't make that SP work, it just goes on and I get nothing displayed in QA. After a while, I press the red stop button and all I get is some code snippet from the SP itself.|||I can't make that SP work, it just goes on and I get nothing displayed in QA. After a while, I press the red stop button and all I get is some code snippet from the SP itself.

Just to clarify, I don't use the SP itself (the one in blue text at the bottom of the link that I posted earlier). I used the page as a reference on how to use fn_get_sql (which is new to SP3). Instead, you can use the SQL BOL reference for fn_get_sql instead.

My apologies, I probably should have posted the SQL BOL reference first.

Regards,

hmscott|||hmscott, many thanks for your help, but, If I understand, this procedure requires privileges to write a store procedure at the server, and I can't do that, I only have privilges to read information.

regards

Alfredo

As I mentioned in another reply, the link is principally to highlight the functionality that is available by using the new (as of SP3) internal function called fn_get_sql. Instead, try looking up fn_get_sql in the SQL BOL (make sure that you get the updated version of the BOL). In particular, there is an example at the bottom of the SQL BOL reference that shows how to use fn_get_sql with the sysprocesses table:

DECLARE @.Handle binary(20)
SELECT @.Handle = sql_handle FROM sysprocesses WHERE spid = 52
SELECT * FROM ::fn_get_sql(@.Handle)

Not meaning to be rude or presumptuous, but if you don't have rights to create an SP on the DB, can you not engage your sysadmin/dba to assist?

Regards,

hmscott|||Is there any way at all to get the full SQL without SP3 ?|||Is there any way at all to get the full SQL without SP3 ?

Not that I am aware of.

You really ought to be running SP3 anyway. Too many vulnerabilities pre-SP3.

Regards,

hmscott

how i will convert MS SQL Express Edition to MS SQL 2005

hi friend

now i am using VS 2005 and MS SQL express edition as Database. i want to host the application.

at server it will not support sql express edition. how i will convert.mdf file to MS SQL server 2005

please help me friends.

AOA Manzoor,

There is no special requirement to convert MS SQL Express Database to SQL Server 2005 Database..

You can attach the SQL Express 2005 Database File (.mdf ) with the same database attachment procedure that we follow on SQL Server 2005 Database attachment ,

All you need is

1. Open the SQL Server 2005 Management Studio, Right Click onDatabase Node, ChooseAttach Menu Item

2. Attach Database Form will be open, PressAdd button to add Source .mdf file

3. After pressingAddbutton,Location Database Files Dialog box will be open, select your source.mdf file and pressOK button.

4. PrssOK button , Aftere pressing OK Database Attachment process will be start

Thats All

Thanks

Best Regards,

Muhammad Akhtar Shiekh

|||

Hello,

Can you convert the database around the other way. From MS SQL to SQL Express?

Cheers,

isopro