How to select the column with respect to language in sql server
USE Master
SELECT * FROM SysMessages
GO
when i execute the above query, in description column am getting English and Chinese , here if i want to select only English .
how can i select only English language by using WHERE condition.
And why am getting data in Description column in Chinese also any reason behind it.
If there is any reason please suggest me.
Bro , here am not getting what is Unicode and all
Specially ,
Why does we need N' string ' while inserting and Why we need to place N and String in Unicode while inserting data and what does it mean.
Insert into T1 Values
(N'找不到由給定的 @article 或 @artid ''%1!'' 所參考的物件。'),
(N'Unclosed quotation mark after the character string .')
Similar Messages
-
How to Move the Shared Services Registry to a different SQL Server
I have an Essbase installation purely running Essbase and Financial Reporting/Web Analysis.
The Shared Services database is held in SQL Server 2005 on one hardware platform and I need to move it to an alternative hardware platform also running SQL 2005.
I thought it might be as easy as backing up from one server and restoring to the other and then running EPM System Configurator.
Firstly, when running configurator and selecting the Hyperion Foundation Configure Database option, on the 'Shared Services and Registry Database Configuration' screen the details of the original hardware are displayed, clicking 'Next' gets no response.
If I can resolve this first issue, how do I then re-point the database to the new server?
Any help would be appreciated.
Thanks.Hi John
Took a look at the link thanks.
On point 3 it says to stop the original database. If you take the database offline, in configurator you don't then get the options in option 5!
In the dos command window for configurator I get 'Unknown Source' messages (either using current server or new).
configtool.log lists as follows. Does this point to anything?
Thanks.
(Sep 15, 2011, 03:26:47 PM), com.hyperion.hit.wizard.swing.ComboFieldSwingImpl, DEBUG, In ComboFieldSwingImpl.fieldChanged() method:,fld items: [Oracle, Microsoft SQL Server, IBM DB2], value: 1, selected idx: 1
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState$1, DEBUG, validate
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, connect test
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, driver set
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, server= aeSQL02.xxxxxxx-xxxxxx.com
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, whiteSpace remove
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, begin test cycle
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, define driver
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, make connection
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, set URL
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.RegistryWizardState$1, DEBUG, connection is NOT null
(Sep 15, 2011, 03:26:50 PM), com.hyperion.config.wizard.impl.DBConnectionForm, DEBUG, DB type string = MSSQLServer
(Sep 15, 2011, 03:26:50 PM), com.hyperion.cis.config.Configurator, DEBUG, Loading DBConfigurator class for product: Foundation_1_9.5.0.0
(Sep 15, 2011, 03:26:51 PM), com.hyperion.cis.config.Configurator, ERROR, Error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.hyperion.cis.config.Configurator.loadProductDBConfigurators(Configurator.java:210)
at com.hyperion.config.wizard.impl.RegistryWizardState$1.validate(RegistryWizardState.java:205)
at com.hyperion.cis.config.wizard.adapter.WizardFormAdapterPanel.queryExit(WizardFormAdapterPanel.java:95)
at com.installshield.wizard.awt.AWTWizardUI.doNext(Unknown Source)
at com.installshield.wizard.awt.AWTWizardUI.actionPerformed(Unknown Source)
at com.installshield.wizard.swing.SwingWizardUI.actionPerformed(SwingWizardUI.java:1693)
at com.installshield.wizard.swing.SwingWizardUI$SwingNavigationController.notifyListeners(SwingWizardUI.java:1899)
at com.installshield.wizard.swing.SwingWizardUI$SwingNavigationController.actionPerformed(SwingWizardUI.java:1894)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.hyperion.foundation.config.FoundationDbConfigurator.isHubInstalled(FoundationDbConfigurator.java:133)
at com.hyperion.foundation.config.FoundationDbConfigurator.<init>(FoundationDbConfigurator.java:38)
... 36 more -
I use MS Excel 2007.
I want to keep the column fixed whenever I refresh data in pivot tables.
I tried even coding it with a macro:
Columns("B:F").Select
Columns("B:F").EntireColumn.AutoFit
And, in another time I tried columnwidth value to a fixed number; both doesnt work.
Please suggest a solution
Thanks in advance
Rafeek KBMHi Rafeek,
One solution is to set the column width after manually or programmatically refresh the PivotTable, for example:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Columns("A").ColumnWidth = 10
End Sub
Another option is to set the column width, then protect the columns from been updated by the user, before refreshing the PivotTable, unprotect the worksheet. For example:
Public Sub LockColumnA()
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Columns("A").ColumnWidth = 10
ws.Columns("A").Locked = True
ws.Protect "123"
End Sub
Public Sub UnprotectWorksheet()
Dim ws As Worksheet
Set ws = Application.ActiveWorkbook.ActiveSheet
ws.Unprotect ("123")
End Sub
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to identify the NoEndDate option in recurrence appointment in sql server
Hi,
I am having recurring appointment with no end date option and how i can identify the appointment having no end date option in sql server 2008Itis difficult to answer without knowing the table structure and sample data however Something like this should work you:
SELECT * FROM YourTableName where EndDate is null
Good Luck! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue -
How to disable the future dates in Date pick calendar - SQL Server Reporting Services
Hi All,
I have a scenario to run the report only for the Past days, and i have datepick calendar as a parameter for selecting Start Date and End Date. I want to control the Users by not to select the Future Dates in the End Date. In Other Words, the user should not select beyond the Current Date,
Is there any way for me to control it. Advance Thanks
Regards,
Sundarrajan.Hi
Here is a solution for ur problem: put the below code in the script, and the add
OnClientDateSelectionChanged="checkDate"
in the calenderExtender... u ll get the answer nicely.. Happy coding..
<script type="text/javascript">
function checkDate(sender,args){
alert("You cannot select a day greater than today!")
sender._selectedDate = new Date();
sender._textbox.set_Value(sender.selectedDate.format(sender._format))
}</script> -
How to find the list of unused stored procedures in SQL Server 2005?
Hi,
I need to find out the list of stored procedures which are not in use.
I found there is something called "sys.dm_exec_procedure_stats " for SQL server 2008.
Can you please suggest your ides here to do the same job for SQL server 2005.
Many Thanks.In SQL 2005 there is, sort of. This is query lists the last execution
time for all SQL modules in a database:
SELECT object_name(m.object_id), MAX(qs.last_execution_time)
FROM sys.sql_modules m
LEFT JOIN (sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text (qs.sql_handle) st)
ON m.object_id = st.objectid
AND st.dbid = db_id()
GROUP BY object_name(m.object_id)
But there are tons of caveats. The starting point of this query is
the dynamic management view dm_exec_query_stats, and the contents is
per *query plan*. If a stored procedure contains several queries,
there are more than one entry for the procedure in dm_exec_query_stats.
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to Select from Oracle 8i database and insert into Sql Server 2005 datab
Hi how to Select from Oracle 8i and insert into Sql Server 2005.
Source db as Oracle 8i
Target db as Sql Server 2005.
I need to select one table data from Oracle 8i & insert into Sql Server 2005
ThanksThanks Khan..
Is there is any query (OPENQUERY) available for that?
Regards.. -
How to sort specific column when using GROUPING SETS in SQL Server?
If I remember correctly, in SQL Server, it is not recommended to use "ORDER BY" when there's already a GROUP BY GROUPING SETS.
I have two columns: [UPC#] & [Description] both are varchar.
My grouping sets is like this:
GROUP BY
GROUPING SETS
([UPC],[Description])
I don't have 'ORDER BY' but it's automatically sorting the Description column.
If I added a 3rd column, sum(Qty), then it doesn't sort by Description anymore. But if I added
ORDER BY [Description]
then the grand total of sum(Qty) will be at the first row instead of the last.
Is there a way to sort the Description column and still let the grand total of sum(Qty) be at the last row instead?
Thanks.Yes, it works.
Thank you.
Could you kindly explain the logic?
I don't quite understand the "= 3 THEN 1 ELSE 0" part.
Is the #3 mean the column index 3?
GROUPING_ID returns a bit mask value depending on number of columns grouped in the result
So when you do GROUPING_ID(([UPC]),([Description]))
it has two columns UPC and Description so bit mask will be as follows
0 ie 00 for rows grouped by both UPC and Description fields
1 ie 01 for rows grouped by UPC ie UPC subtotals
2 ie 10 for rows grouped by Description ie Description subtotals
3 ie 11 for rows not grouped by both columns ie Grand total
see
http://msdn.microsoft.com/en-IN/library/bb510624.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to enclosed the column with in double quotes while spooling to csv fie
Dear Members,
I have to spool a sql to a CSV file. I have two columns to spool one is vendor_id and another is vendor_name. But the 2nd column vendor_name has commas in it so if i see the o/p it looks like this:
Suppose vendor_id = 12790 vendor_name = T T I, INCORPORATED
when i see the csv file it looks
12790,T T I, INCORPORATED
I want each column be enclosed in double quotes like this
"12790","T T I, INCORPORATED"
How can i do this in sql*plus while spooling to a csv file.
Thanks
sandeepthis?
SQL> select '"'||'Hi'||'"'||',"'||'how'||'"' from dual;
'"'||'HI'|
"Hi","how" -
How to select header group with detailed data in one SQL
Dear,
I would like to have a little help from you. My goal is to create a view where data must be in appropriate format. In this format i would like to have for each group one header.
I have 3 tables which they ar connected to each other (representing hierachical data where financial plan breaks across different groups).
CRM_PLAN
CRM_PLAN_ID
DATE
AMOUNT
CRM_PLAN_PE
CRM_PLAN_PE_ID
TITLE
AMOUNT
CRM_PLAN_ID (ref key to CRM_PLAN.CRM_PLAN_ID)
CRM_PLAN_MONTH
CRM_PLAN_MONTH_ID
YEAR
MONTH
AMOUNT
CRM_PLAN_PE_ID (foreign key to CRM_PLAN_PE.CRM_PLAN_PE_ID)
Data looks like:
CRM_PLAN
CRM_PLAN_ID | DATE | AMOUNT
1 | 01.01.2012 | 500
2 | 01.02.2012 | 200
CRM_PLAN_PE
CRM_PLAN_PE_ID |TITLE | AMOUNT | CRM_PLAN_ID
1 | Organization 1 |100 | 1
2 | Organization 2 |400 | 1
3 | Organization 3 |200 | 2
CRM_PLAN_MONTH
CRM_PLAN_MONTH_ID | YEAR | MONTH | AMOUNT | CRM_PLAN_PE_ID
1 | 2012| 1 | 60 |1
2 | 2012| 2 | 40 |1
3 | 2012| 1 | 350 |2
4 | 2012| 2 | 50 |2
5 | 2012| 1 | 200 |3
I would like view which would return data like:
MONTH | AMOUNT
Organization 1 |null
1 | 60
2 | 40
Organization 2 | null
1 | 350
2 | 50
Organization 3 | null
1 | 200
The main question is hot to write an sql as source for view to insert before each group a row with title column value from table CRM_PLAN_PE. Is that even possible? Maybe you could suggest me some other method.
View will be used in oracle form where will be possible to edit data - I will arrange that through insted of trigger.
Regards,
Igor
Edited by: user5528050 on 29.11.2012 2:23
Edited by: user5528050 on 29.11.2012 2:24
Edited by: user5528050 on 29.11.2012 2:25Hi, Igor,
user5528050 wrote:
... I would like view which would return data like:
MONTH | AMOUNT
Organization 1 |null
1 | 60
2 | 40
Organization 2 | null
1 | 350
2 | 50
Organization 3 | null
1 | 200
The main question is hot to write an sql as source for view to insert before each group a row with title column value from table CRM_PLAN_PE. Is that even possible? Maybe you could suggest me some other method. So, you want to have 2 different kinds of rows in the output:
(1) "parent" or "master" rows containing data from crm_plan_pe, such as
MONTH AMOUNT
============== ======
Organization 1(2) "child" or "detail" rows containing data from crm_plan_month, such as
MONTH AMOUNT
============== ======
1 60Sure, you can do that.
One way is to do a UNION of 2 separate queries: (1) to generate just the parent rows, (2) to generate just the child rows.
You could also join the 2 tables and use GROUP BY GROUPING SETS. The super-aggregate rows would be the parent rows.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved (it looks like crm_plan is not involved in this problem), and also post the results you want from that data. You need to post this whether or not you want SQL code in reply. The people who want to help you want to provide good answers, and that means they want to re-create the probelm and try their ideas.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002} -
How to show the columns dynamically in OBIEE report based on the selection?
Hi,
I have a requirement where the columns should be dynamically shown in report based on what we select in propmt page.
I'm creating a report in OBIEE where i want to give an option to the end user to select the columns whichever he wants to see in the report.
For example I have the following columns in the report already:
Customer Name,
Customer Number,
Bank Account,
Address
I want to give an option to the user to select 'Customer Mail ID' dynamically and see the column to be displyed in the report along with the existing columns.
Through 'Column Selector' user can select a single column at a time, but if he want to select more than one column, how can we do this ?
Please help me out in resolving this issue.
Thanks,
Chaithanya.Hi Chaithanya,
there's not a straight solution for this. You can create different analysis containing different number of columns and then directing the user to this analysis using Action Links or you can also use View Selector to switch from one view (analysis) to the other. But it's not going to be very flexible nor dynamic.
J. -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to select the "in columns" dimension on export all Command ?
Hello,
I'm trying to export data from an V6.5 Essbase database to a 9.2 one.
The easier and faster way I found is to use the 'Export database all data in Columns' from the 6.5 cube and load the data with a rule file in the 9.2 (The Export database command is MaxL command).
The Export All Command with the "in columns options", export all data and put one dimensions in columns. Previously, It was always the Time dimension (M01 .... M12). And all worked fine.
But someone changed the order of the dimensions in the V6.5 Essbase database. And now, there is another dimension (which changes more often) in columns and which have a lot of members (meanwhile my time dimension only have 12 members).
So do you know how to select the dimensions which is in columns when using the export database all data function ? I do not see any options in Maxl ?? Maybe there is a rule to follow, in the dimensions order ?
Do you have any idea about it ?
Thanks for your help
P.S : I'd prefer to avoid workaround such as using Reports Scripts or Calc Script (there are too slow).Why not use Essbase's native export format, bring it over onto your new environment, and reimport? Change to your heart's content on the target.
Yes, the dimensionality (names, order, members, etc.) will have to be the same, but this approach, not the columnar export, is the fastest and most efficient way.
Regards,
Cameron Lackpour -
How to select the printer and select the ICC profile for printing with VBScript?
I try to automate my printing procedure in photoshop. The problem is that I don't know how to select the printer and select the icc profile for printing with vbscript like I manually do in the print-menu in photoshop?
Anyone has done this before?
Thanx!
jusClient/Server version:
- D2KWUTIL.PLL library provides a 'Select Printer' dialog box to be used in Forms: WIN_API_DIALOG.SELECT_PRINTER
http://guenter-huerkamp.dyndns.org/oracle-doc/docs/html/d2kwutil.html
I suggest you to create a form to invoke the report, allowing user to select the printer and then pass it as parameter DESNAME -
How can i register column with in the query
hi all
how can i register column with in the query?Thanks.
In my business one, the column width was registed.
But I don't know how can I do it.
So I try to save the query again after change column width.
Then the query was opend with changed column width.
Is it right function?
Is there any way to register the column width?
It's very troublesome to change column width every time.
seiichi
Maybe you are looking for
-
Problem with PDF output quality
We recently upgraded to CS4 Suite Design premium and i am having problems getting illustrator to print high quality output. I have a file created in illustrator which contains 300dpi tiff images created in photoshop (CMYK colorspace in both photosho
-
HT2404 Why isn't 'APP STORE' easier to FIND??????
Can someone PLEASE explain why The geniuses with Apple DO NOT ALLOW US TO BOOKMARK THE APP STORE (ver. 1.3) or any other version directly from our BROWSERS? Apple forces us to zigzag through their site to FIND additional software created by 3rd part
-
Take long time to shut down for macbook pro OS yosemite
after installed yosemite, my macbook pro (year 2013)take very long time (about 30sec) to shut off when i click shut down.. anyone have the same problem?
-
Cant install ActiveSync 4.5 on Windows server 2003
hi i try to install ActiveSync 4.5 on Windows Server 2003 - It seems that it installs but after the reset the computer want to install again... and no ActiveSync was installed how to install ActiveSync 4.5 on Windows Server 2003 SP1 ? thanks
-
Download gurus for 81701 searched!!!
Why does Oracle put only a big monolitic 0.5Gb file and not many split files? Where is the complexity on doing this? Anyone knows alternate Oracle paths to download 81701 to test ops on Linux? I try with netscape and konqueror but connection dies aft