基于内部联接oracle sql插入(Insert based on inner join oracle sql)
我有一张表A,其中有三列ab c。 我想基于列c与另一个表B的连接将值插入到列a和b中
我使用以下查询
MERGE INTO A USING (SELECT * FROM B) **B** ON (B.c=A.c) WHEN MATCHED THEN INSERT(a,b) VALUES(local_varialble,'STRING');
我收到以下错误
PL/SQL : ORA-00905 : MISSING KEYWORD
请帮忙 !! 这个查询似乎总是很棘手
编辑:我发现在ON条件下使用!=并且在WHEN NOT MATCHED完成编译后完成编译...但我不知道它是否会产生正确的结果
I have a table A with three columns a b c. I want to insert values in to columns a and b based on the join of column c with another table B
I am using the following query
MERGE INTO A USING (SELECT * FROM B) **B** ON (B.c=A.c) WHEN MATCHED THEN INSERT(a,b) VALUES(local_varialble,'STRING');
I am getting the following error
PL/SQL : ORA-00905 : MISSING KEYWORD
Please help !! This query always seems to be tricky
EDIT : I found out that using != in the ON condition and following it up with WHEN NOT MATCHED compiles perfectly.. but I don't know whether it yields the correct result
原文:https://stackoverflow.com/questions/19793143
最满意答案
您可以使用此服务,在服务中您可以获得系统的时间并检查它是否给予时间。 每10分钟后,只显示Toast。
you can use service for this, In service you can get the time of system and check it for giving time. After for every 10 minutes just display Toast.
相关问答
更多-
你可以做类似的事情, NSString *startTime = @"02:00 AM"; NSString *endTime = @"11:00 AM"; NSDateFormatter *timeFormat = [[NSDateFormatter alloc] init]; [timeFormat setDateFormat:@"hh:mm a"]; NSDate* fromTime = [timeFormat dateFromString:startTime]; NSDate* toTime = ...
-
您可以使用logrotate每10分钟创建一个新的slow.log并逐个分析它们。 暗示你正在使用Linux。 请注意,您的示例显示您的mysql实例配置为“log-queries-not-using-indexes”,因此您也将获得那些在日志文件中也不使用索引的SELECT。 更新: 因为我还不知道你正在使用什么操作系统,对你的问题更普遍的方法是将慢速日志重定向到mysql文件后面的mysql本身,并从慢速日志表获取所有记录,如: SELECT COUNT(*) FROM slow_log; 这将为您提 ...
-
对于n = 10 rn = ROW_NUMBER() OVER( PARTITION BY DATEDIFF(MINUTE, 0, cdt) / 10 ORDER BY cdt DESC) for n = 10 rn = ROW_NUMBER() OVER( PARTITION BY DATEDIFF(MINUTE, 0, cdt) / 10 ORDER BY cdt DESC) ...
-
你也可以像下面这样使用datepart来获得15分钟的间隔 datepart(minute,timestamp)%15=0 您还可以使用数字表预填充如下表格 select DATEADd(MI,number, Convert(DateTime, DATEDIFF(DAY, 0, GETDATE()))),Number from numbers where number%15=0 这会给我以下结果 2017-09-21 00:00:00.000 2017-09-21 00:15:00.000 ...
-
设置Android Toast持续时间非常长(例如1分钟)(Set Android Toast duration to be really long (e.g., 1 minute))[2022-03-19]
由于LENGTH_SHORT为2秒(而LENGTH_LONG为3.5秒),请尝试以下操作: for (int i=0; i < 30; i++) { Toast.makeText(this, "MESSAGE", Toast.LENGTH_SHORT).show(); } Since LENGTH_SHORT is 2 seconds (and LENGTH_LONG is 3.5 seconds), try this: for (int i=0; i < 30; i++) { Toast ... -
Android Studio取消Toast消息以显示新消息(Android Studio cancelling Toast message for the new message to show)[2023-03-18]
当你写这行时,你正在实例化一个新的Toast对象 Toast toastObject = Toast.makeText(this, "", Toast.LENGTH_LONG); 然后当你打电话 toastObject.cancel(); 你正在取消你刚刚创建的Toast ,它是空的。 Toast toastObject = Toast.makeText(this, "", Toast.LENGTH_LONG); <-- new Toast creation, set to toastObject toas ... -
您可以使用此服务,在服务中您可以获得系统的时间并检查它是否给予时间。 每10分钟后,只显示Toast。 you can use service for this, In service you can get the time of system and check it for giving time. After for every 10 minutes just display Toast.
-
你可以试试: 使用索引批量查找用户,因此可以使用索引来计算延迟时间。 使用wait选项延迟作业而不是超时。 User.find_in_batches.with_index do |group, index| puts "Processing group ##{index}" GCMJob.set(wait: index.minutes).perform_later(group.ids) # each batch will have 60 seconds in between end class G ...
-
哦,人,你的问题很难 ,花了5个小时在这个查询。 我使用查询 找到解决方案 。 脚步 : 1.) you have to create procedure. 点击这里 2.) Download it and import "generate_series.sql" in your table. 3.) You have to run two queries : 3.1) 1st you have to call procedure. 3.2) 2nd you have to write an ...
-
将文本与180比较: if(Integer.valueOf(ed1.getText().toString())<180) Toast.makeText(getBaseContext(),"Message",Tosat.LENGTH_LONG).show(); Compare the text with 180 by: if(Integer.valueOf(ed1.getText().toString())<180) Toast.makeText(getBaseContext(),"Me ...