1
下午好! 反正我正在嘗試,但我似乎無法得到一個選項卡在火鳥varchar的結尾。 有誰知道該怎麼做?從Firebird中刪除表格
在此先感謝。
編輯留下更具體的:
例:
Select guia, convenio, nome, trim (matricula) from table where guia = '142'
Group by guia, convenio, nome, trim (matricula)
結果
142 | 1 | Name of patient | 111222
142 | 1 | Name of patient | 111222
然而,如果刪除登記字段,它是一個varchar(40),其是與標籤:
Select guia, convenio, nome, matricula from table where guia = '142'
Group by guia, convenio, nome
結果是:
142 | 1 | nome do paciente
當我發現這個問題是招生:
有了這個功能的幫助:CHAR_LENGTH(matricula)
Select guia, convenio, nome, matricula, Char_Length (matricula) from table where guia = '142'
Group by guia, convenio, nome, matricula
結果:
142 | 1 | nome do paciente | 111222 | 6
142 | 1 | nome do paciente | 111222 | 10
爲什麼在沒有聚合函數(例如MAX,SUM,COUNT)時執行GROUP BY?另外,一般的GROUP BY規則指出:如果指定了GROUP BY子句,則SELECT列表中的每個列引用必須標識分組列或作爲set函數的參數! – jarlh
我不清楚問題是什麼。你能否添加更多信息?因爲你說_「我似乎無法得到一個varchar末尾的選項卡」_,但是其餘的描述似乎表明了相反的情況(即:要刪除製表符)。請注意,真正的解決方案是防止這些角色首先進入數據庫。 –
這正是我告訴我的老闆......但他希望這樣做......我需要重新記錄字段選項卡,所以通過看到相同的註冊併成爲一行。但是對於選項卡,字符大小因行而異...... – sounobre