How to use MONTH NAME in where condition in date column?
Hi dudes,
this is the table.
sql>desc ACMINUTESPDFTEST;
Name Null? Type
ACDATE DATE
TYPES VARCHAR2(10)
here i have tried the following 2 queries,but i could not get the correct result
select types,seqno,acdate from ACMINUTESPDFTEST where acdate like to_date('NOV','MON');
or
select types,seqno,acdate from ACMINUTESPDFTEST where acdate = to_date('NOV','MON');
(for both the query the output is same)
TYPES ACDATE
PINK 01-NOV-10
but the table having following data:
TYPES ACDATE
PINK 14-NOV-10
WHITE 15-NOV-10
PINK 01-NOV-10
Any suggestion why i could not get correct result.
bharathit wrote:
Thanks for toon and divya...it solved my problem and my question how will you select between two months..
select types,acdate from ACMINUTESPDFTEST where to_char(acdate,'MON') >= 'SEP' AND to_char(acdate,'MON') <= 'OCT';
and i got
no rows selected
Edited by: bharathit on Nov 2, 2010 10:37 PMIf you're interested in finding dates in a range of months regardless of the year then try this:
select ...
from ...
where to_number(to_char(date_column,'MM')) Between 9 And 10;You could also do something like:
select ...
from ...
where to_number(to_char(date_column,'MM')) In (1,4,7,10);If you are interested in dates in a range of months in a particular year however, use something like this:
select ...
from ...
where date_column >= date '2010-09-01' and
date_column < date '2010-11-01' and
Similar Messages
-
How to Concatenate Table name and Where condition at runtime
I am passing parameter as User and Zone to Stored Procedure.How to concatenate Table Name
and WHERE CONDITION in SQL Statement.i have different type of users and zones.Hi !
declare
cur sys_refcursor;
r emp%rowtype;
v_sql varchar2(512);
begin
-- do your logic here
v_sql := 'select * from emp';
open cur for v_sql;
loop
fetch cur into r;
exit when cur%notfound;
dbms_output.put_line(r.ename);
end loop;
close cur;
end;In this example you can see how can be done this with cursor vars .. You should concatenate v_sql string according to your requirements.
But as in further posts has already been mentioned , be carefull at publishing such kind of procedures and think on security.
Also when you want dynamicaly change from clause , you should consider using different records to accept data ? Maybe all your tables has the same structure and then this problem will be smaller.
T
T -
Where condition on date column using OleDb Command?
Hi,
How to read date column from excel sheet usign OleDb command. Below code failing .
OleDbCommand cmd = new OleDbCommand("SELECT Column1 FROM [sheet1$] WHERE createdDate < ="+Convert.ToDateTime("3/24/2015")+" ", connection);
OleDbDataReader dr = cmd.ExecuteReader();
Syntax error (missing operator) in query expression 'LastRun < =3/24/2015 12:00:00 AM'.
How to write a where condition on date column excel sheet?
Thanks
PS.Shakeer HussainHi PS.Shakeer Hussain,
In Excel, we store these data in excel is string type. Based on your code, it is dataTime type. So if fails when compare with dataTime and string.
Please try the following code, Useing DateTime.ToOADate Method to convert to the equivalent OLE Automation date. It works fine on my side.
OleDbDataAdapter dbAdapter = new OleDbDataAdapter("select * from [Sheet1$] WHERE createdDate < "+DateTime.Parse("3/29/2015").ToOADate(), connExcel);
Best regards,
Kristin
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 use allies names in ON condition
i have the following query.
SELECT
DD.DATE_KEY
, (SELECT MIN(NVI_DATE) AS NVI_MIN_DATE FROM FCT_SPA_NVI_OUTRIGHT A WHERE A.VENDOR_CODE=V.VENDOR_CODE) AS NVI_MIN_DATE
, VO.BANK_ACCOUNT_NO
, VO.BANK_NAME
, VO.BANK_ROUTING_NO
FROM DIM_VENDOR V
LEFT JOIN FCT_SPA_NVI_OUTRIGHT VO
ON V.VENDOR_CODE = VO.VENDOR_CODE
LEFT JOIN FCT_SPA_NVI_MERCHANDISE VP
ON VO.NVI_KEY=VP.NVI_KEY
LEFT JOIN DIM_DATE DD
ON VO.NVI_DATE=DD.DATE_FLD
in the above query, how to use NVI_MIN_DATE in the ON condItion like.,
LEFT JOIN DIM_DATE DD
ON NVI_MIN_DATE=DD.DATE_FLD
Thanks in advance.
bala krishnaTry using a CTE, so something like this.
WITH TableA (NVI_MIN_DATE, BANK_ACCOUNT_NO, BANK_NAME, BANK_ROUTING_NO)
AS
SELECT
(SELECT MIN(NVI_DATE) AS NVI_MIN_DATE FROM FCT_SPA_NVI_OUTRIGHT A WHERE A.VENDOR_CODE=V.VENDOR_CODE) AS NVI_MIN_DATE,
VO.BANK_ACCOUNT_NO,
VO.BANK_NAME,
VO.BANK_ROUTING_NO
FROM DIM_VENDOR V
LEFT JOIN FCT_SPA_NVI_OUTRIGHT VO
ON V.VENDOR_CODE = VO.VENDOR_CODE
LEFT JOIN FCT_SPA_NVI_MERCHANDISE VP
ON VO.NVI_KEY=VP.NVI_KEY
SELECT
DD.DATE_KEY,
TableA.*
FROM TableA
LEFT JOIN DIM_DATE DD ON
TableA.NVI_DATE=DD.DATE_FLD
John Sansom | SQL Server MCM
Blog |
Twitter | LinkedIn |
SQL Consulting -
How to use alias name in where clause
Hello,
DECODE (item.inv_type,'OT', (DECODE (item.attribute2, 'STONE', 0, xfer.release_quantity1 * xfer.attribute10)
'FG', (xfer.release_quantity1 * xfer.attribute10)
) matl_val
In the above code matl_val is alias name i need to use that one in where clause as
where matl_val > 0
is this possible or anyother way can anyone help me.But the point is as you haven't read the documentation you may miss some valuable points about alias and will soon end with another problem.
>
Specify an alias for the column expression. Oracle Database will use this alias in the column heading of the result set. The AS keyword is optional. The alias effectively renames the select list item for the duration of the query. The alias can be used in the order_by_clause but not other clauses in the query.
>
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#SQLRF01702 -
How to use between timestamp in where clause
Hi All,
i have a colum column2 of data type timestamp.now i wants to fatch record having between two date of column2.how to use between operator in where condition having column as timespamp'Hi,
You can use a timestamp literal, or use a function that return a timestamp datatype, here is an example:
(TIMESTAMP 'YYYY-MM-DD HH24:MI:SS.FF')
select * from yourtable where column2 between TIMESTAMP '1997-01-31 09:26:50.12' and systimestampHave a look to the documentation, for example http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch4datetime.htm -
Create a between filter using months names ...
Hi, I need to create a dashboard filter using month names in a between statement for examples:
From: January - To August
the problem is when I do this the Obiee server made a filter by alphabetic order, so for the example the result will be nothing (because A is prior to J)...
How can I solve this
(My boss is in my neck and I have a family to feed...)
Thanks in advance...Hi,
mma as given you the solution which would be helpful.
I can say workaround for this,what ever date parameter you want to convert to january....december
you can make an alias of that column as said above and write the filter on that date with a sql statement example as follows
select to_char(sysdate,'FMmonth') from dual
same way you take your requirement as select to_char(*your_date_column*,'FMmonth') from your_table
Hope it helps,
Best Wishes,
Kranthi.
Edited by: Kranthi.K on Nov 9, 2009 10:56 PM -
How to show montha name starting from APR to MAR
Hi,
How to show financial year in report .
I.e
When i select month column in my report i need to get values starting from APR to till MAR. Can any one tell me how to show it.
APR,
MAY,
JUN,
JUL,
AUG,
SEP,
OCT,
NOV,
DEC,
JAN,
FEB,
MARHi,
Steps to achieve,
1. Go to analysis pull it out your month columns two times (let rename it month Id and month name)
2.) edit formula on month Id columns put it below contional statement
E.x:
Case when month name = 'January' then '1'
When month name ='February' then '2'
When case month name='November' then '11' Else '12' end
3.) Go to month name columns in your analysis criteria and edit formula here u just make it first 3 char of your month name columns by using left( month name, 3)
4 ) sort month name columns by using month id columns then hide month id columns it will work as you expected
Another solution:
First you need to add the function monthname in the column formula. This will give you month names.
Ex-MONTHNAME("Cal Date")
To sort, add bin or write case statements in other column and sort it.
Ex- case
when MONTHNAME("Cal Date")='Jan' then 1
when MONTHNAME("Cal Date")='Feb' then 2
end
Hope this help's
Thanks,
Satya -
How to use CASE stmt in Where clause
Hi,
How to use CASE stmt in WHERE clause?. I need the code. Please send me as early as possible..........Hi,
1004977 wrote:
Hi,
How to use CASE stmt in WHERE clause?. There's no difference between how a CASE expression is used in a WHERE clause, and how it is used in any other clause. CASE ... END always returns a single scalar value, and it can be used almost anywere a single scalar expression (such as a column, a literal, a single-row function, a + operation, ...) can be used.
CASE expressions aren't needed in WHERE clauses very much. The reason CASE expressions are so useful is that they allow you to do IF-THEN-ELSE logic anywhere in SQL. The WHERE clause already allows you to do IF-THEN-ELSE logic, usually in a more convenient way.
I need the code.So do the peple who want t help you. Post a query where you'd like to use a CASE expression in the WHERE clause. Post CREATE TABLE and INSERT statements for any tables used unless they are commonly available, such as scott.emp). Also, post the results you want from that sample data, and explain how you get those resuts from that data.
See the forum FAQ {message:id=9360002}
Please send me as early as possible..........As mentioned bfore, that's rude. It's also self-defeating. Nobody will refuse to help you because you don't appear pushy enough, but some people will refuse to help you if you appear too pushy. -
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
How to use the customer types in customer master data
how to use the customer types in customer master data?
menu path is Extras -> account group info -> customer typeshi,
This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
default sp ,consumer.
See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
I hope this clarifies your quiery.Reward points if so.
Thanking you,
Best regards,
R.Srinivasan -
How to use for all entires clause while fetching data from archived tables
How to use for all entires clause while fetching data from archived tables using the FM
/PBS/SELECT_INTO_TABLE' .
I need to fetch data from an Archived table for all the entries in an internal table.
Kindly provide some inputs for the same.
thanks n Regards
RameshHi Ramesh,
I have a query regarding accessing archived data through PBS.
I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
The call to the above FM is as follows :
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
archiv = 'CFI'
OPTION = ''
tabname = 'BKPF'
SCHL1_NAME = 'BELNR'
SCHL1_VON = belnr-low
SCHL1_BIS = belnr-low
SCHL2_NAME = 'GJAHR'
SCHL2_VON = GJAHR-LOW
SCHL2_BIS = GJAHR-LOW
SCHL3_NAME = 'BUKRS'
SCHL3_VON = bukrs-low
SCHL3_BIS = bukrs-low
SCHL4_NAME =
SCHL4_VON =
SCHL4_BIS =
CLR_ITAB = 'X'
MAX_ZAHL =
tables
i_tabelle = t_bkpf
SCHL1_IN =
SCHL2_IN =
SCHL3_IN =
SCHL4_IN =
EXCEPTIONS
EOF = 1
OTHERS = 2
OTHERS = 3
It gives me the following error :
Index for table not supported ! BKPF BELNR.
Please help ASAP.
Thnaks and Regards
Gurpreet Singh -
after transfering data froAm my pc to mac using windows migration assist, where do the data go to on my mac please?
Welcome to the Apple Support Communities
By default, Migration Assistant creates a new user account where it puts all the transferred data. Just go to > Log Out, and log in the new user that Migration Assistant has created, so you will be able to access to the transferred data.
If you want to merge the data into the first user account, use the Shared folder (it's in /Users/Shared) to put the transferred files there, and then, on the first user, go to the Shared folder and put all the data in the folders you want -
Hi All,
I am a newbie for T-Sql, I came across a SP where multiple tables are engaged using multiple joins but the where clause contain a column field without any table reference and assigned for an incoming variable,like
where 'UserId = @UserId'
instead - no table reference like 'a.UserId = @Userid' ............ Can any please do refer to me any material that clears my mind regarding such issue................... help is appreciated.
Thank You.As suggested above, use table alias with columns for unique referencing and to make the code easier to read.
BOL example for table aliasing:
USE AdventureWorks;
GO
SELECT S.CustomerID, S.Name AS Store, A.City, SP.Name AS State, CR.Name
AS CountryRegion
FROM Sales.Store AS S
JOIN Sales.CustomerAddress AS CA ON CA.CustomerID = S.CustomerID
JOIN Person.Address AS A ON A.AddressID = CA.AddressID
JOIN Person.StateProvince SP ON
SP.StateProvinceID = A.StateProvinceID
JOIN Person.CountryRegion CR ON
CR.CountryRegionCode = SP.CountryRegionCode
ORDER BY S.CustomerID ;
GO
GO
LINK:
http://technet.microsoft.com/en-us/library/ms124824(v=sql.100).aspx
Check the use of TABLE ALIASes and COLUMN ALIASes in the following blog:
http://www.sqlusa.com/bestpractices2005/organizationtree/
Without the use of aliases the code would become unreadable.
Kalman Toth Database & OLAP Architect
Free T-SQL Scripts
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to use case function in where clause
Hi,
Suppose a table DEMO has columns
DEMO TABLE
user_id
user_name
location
In this table i have 15 users. but out of 15 users i want to use only 5 users for passing as user_name.
then how to achieve the result
1. when i pass the particular 5 user_name in where clause then i should get all the user_name and for other 10 users it will show only the passing user_name.
how to use case functionDo you mean this ?
SQL> var name varchar2(10)
SQL> exec :name := 'ALLEN'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
14 rows selected.
SQL> exec :name := 'SMITH'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
14 rows selected.
SQL> exec :name := 'BLAKE'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
BLAKERgds.
Maybe you are looking for
-
Can I delete LR2 after upgrading to LR4?
I just upgraded from LR2.7 to LR4.2. LR2.7 is still on my computer.... The upgrade transferred my old presets OK. So, can I delete LR2.7 without any problems? Ed in Florida
-
I'm having trouble downloading iTunes to Windows 8!
So I click download iTunes, and then it asks me where I want to save the setup file and I click save, and then usually it appears in my downloads file and I can double click on it and then it says run, save, or cancel. This time after I clicked save,
-
can somebody plz help me to convert ps files to pdf files through java.
-
Program to upload contract price changes to inforecord
Hi Friends, Is there any standard program available to update changes in contract price to info record I know if you put info update indicator in contract system will update provided you have EVO parameter set in id But i would like to know if we can
-
Why to need close the result set and statement
why to need close the result set and statement