Showing posts with label required. Show all posts
Showing posts with label required. Show all posts

Friday, March 30, 2012

Help on the unicode

Hi,
im required to display chinese names out using ms sql server but i do know h
ow to use the unicode. Can anyone help me along with it?
Thanks,
JeremyJeremy20
CREATE TABLE #T (c NAVARCHAR(50))
INSERT INTO #T VALUES (N'Chineswordshere')
"Jeremy20" <Jeremy20.2etzkb@.mail.webservertalk.com> wrote in message
news:Jeremy20.2etzkb@.mail.webservertalk.com...
> Hi,
> im required to display chinese names out using ms sql server but i do
> know how to use the unicode. Can anyone help me along with it?
> Thanks,
> Jeremy
>
> --
> Jeremy20
> ---
> Posted via http://www.webservertalk.com
> ---
> View this thread: http://www.webservertalk.com/message1682107.html
>|||Thanks. But i have another problem. I have installed Windows XP language bar
on my machine. So when I go to enterprise manager, I can type in chinese ch
aracters in the database directly and then can view them on the vb.net page.
But when I try to insert a record from the vb.net page by typing chinese cha
racters in the text box, they are all converted to '. Can you help me w
ith it? Thanks

Wednesday, March 28, 2012

Help on SQL Reporting Services

Can someone please explain what is required to install this Software ? I mean , anything special needed at all or I can just slap it on to any Win2K server . I am assuming it doesn't have to be on the same server as SQLIn case you are not concerned about the cost, you don't have to install MS Reporting Services and MS SQL Server on the same machine (you will need extra SQL Server license though). In case you'd like to create web-based reports only, you may fiind LGX Report interesting (it is free): www.FreeReporting.com.

Monday, February 27, 2012

Help me with SP OrderBy

I have a SP that accepts parameters, but the problem is that it is not ORDERING Data as required, It is returning ORDER BY NULL instead of order by my parameter "NAME "here is the output from SQL 2000 DB

'ELP B4 I jump out of LondonBridge

**********************************
SELECT * FROM #TempTable WHERE ID > 0 AND ID < 6 AND EmployerID = 54 AND Job_no = 40

ORDER BY NULL
****************************************


SELECT @.MYSTATEMENT = ' SELECT * FROM #TempTable

WHERE
ID > '+ convert(varchar(20),@.FirstRec) +'
AND
ID < '+convert(varchar(20),@.LastRec) +'
AND EmployerID = '+ convert(varchar(20),@.EmployerID)+'
AND Job_no = '+convert(varchar(20),@.Job_no)+'

ORDER BY ' +
CASE WHEN @.WhichColumn= 'name' AND @.sortby= 'asc'
THEN 'name'
ELSE 'NULL'
END
+
CASE WHEN @.WhichColumn='name' AND @.sortby='DESC'
THEN ' desc'
ELSE ''
END

EXEC (@.myStatement)

try :

ORDER BY ' +
CASE WHEN @.WhichColumn= 'name' AND @.sortby= 'asc' THEN 'name ASC'
WHEN @.WhichColumn = 'name' AND @.sortby = 'desc' THEN 'name desc'
ELSE 'NULL'
END

also do a print @.myStatement before you execute the statement to see how its building up.

hth|||Hi this is the output, it is still showing null

SELECT * FROM #TempTable

WHERE
ID > 0
AND
ID < 6
AND EmployerID = 54
AND Job_no = 40

ORDER BY NULL

(5 row(s) affected)|||what value are you passing to the parameter @.WhichColumn ?|||I have done a print on @.whichColumn, it is giving me the right value which is 'NAME'
So the problem must be from the case statement, but I can't figure it out

Thanks|||


declare @.MYSTATEMENT varchar(500), @.WhichColumn varchar(100), @.sortby varchar(100)
set @.sortby = 'desc'
set @.WhichColumn = 'name'
SELECT @.MYSTATEMENT = ' SELECT * FROM #TempTable WHERE ID > 6 AND ID < 10 ORDER BY ' +

CASE WHEN @.WhichColumn= 'name' AND @.sortby= 'asc' THEN 'name ASC'
WHEN @.WhichColumn = 'name' AND @.sortby = 'desc' THEN 'name desc'
ELSE 'NULL'
END

print @.mystatement

i just did this in my QA and it worked fine for me. so double check your code.

hth