我从昨天开始学习Android Studio.我试着回应简单的"Hello World":
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
但是当我点击"设计"视图时,会出现此错误?
在成功构建之前,设计编辑器不可用
我该如何解决这个错误.我昨天刚刚下载了Android Studio.
我刚注意到我的xml代码导致错误.这就是为什么这可能不起作用.非常感谢
我对 SAS 很陌生。
我想将数字转换为字符。
基本上我想使用 to_char 函数
所以我尝试
proc sql;
select put(A.column,$11.) as new_column
from table A
quit;
Run Code Online (Sandbox Code Playgroud)
这导致错误,
将数字转换为字符的正确方法是什么???
我想知道我是否可以在Macro Loop中做到这一点。
例如,这是tableA
ID -- Fruit -- Count
1 Banana 1
1 Strawberry 2
1 Apple 3
1 Blueberries 4
2 Apple 1
3 Strawberry 1
3 Apple 2
Run Code Online (Sandbox Code Playgroud)
我通常不使用SAS MACRO这样做
proc sql;
select ID,t2.fruit AS fruit1,
t3.fruit AS fruit2,
.
.
.
from core_table t1
LEFT JOIN TableA t2 on t2.id = t1.id AND t2.count=1
LEFT JOIN TableA t3 on t3.id = t1.id AND t3.count=2
.
.
.
.
Run Code Online (Sandbox Code Playgroud)
所以输出就像
ID Fruit1 Fruit2 Fruit3 Fruit4
1 Banana Strawberry Apple …Run Code Online (Sandbox Code Playgroud) 所以我尝试将此代码更改为动态SQL
SELECT LISTAGG(accounting_dept || '-'||REPLACE(full_desc,'''',''''''), '; ') WITHIN GROUP (ORDER BY accounting_dept) FROM table
Run Code Online (Sandbox Code Playgroud)
EXCUTE
12121-President''S Office
Run Code Online (Sandbox Code Playgroud)
我改为动态sql
EXECUTE IMMEDIATE
' SELECT LISTAGG(accounting_dept || ''-''||REPLACE(full_desc,'''''',''''''''), ''; '') WITHIN GROUP (ORDER BY accounting_dept) FROM table '
INTO v_task;
Run Code Online (Sandbox Code Playgroud)
错误是ORA-00907:缺少右括号
问题是这部分REPLACE(full_desc,''''','''''''',
如何在没有警告错误的情况下更改为动态sql?