How to perform an SQL update using TADOCommand? [closed] - crud

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I want to create an update button using TADOCommand which is on a TDataModule, but this code doesn't work. Does anyone know what the correct code is?

Your SQL is malformed, as you are missing commas between the fields:
UPDATE Elektronik SET Nama_Barang = :Nama_Barang, Harga = :Harga, Stok = :Stok WHERE ID = :ID

Related

SAP EXCEL TABLE [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
My code is almost perfect, I need to change one line but in not sure how.
My line is as follows
Session.FindById(wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/ctxtVBAK-VBELN[0,0].Text = Fill(LoopNum)
My problem is I need it to be this
Session.FindById(wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/ctxtVBAK-VBELN[0,LoopNum].Text = Fill(LoopNum)
My suggestion is as follows:
Session.FindById("wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON‌​/‌​ctxtVBAK-VBELN[0,‌​" & cstr(Loo‌​pNum) & "]").Text = Fill(LoopNum)
Regards,
ScriptMan

SQL Image field divided by 2 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Could anyone help me on the below please?
I have a field called F1.Images and I need to divide by 2 ONLY when my other field W1.Plex is Duplex else I need to retain the F1.Images count.
Thanks Satya
Sorted Brad.
Used Case/When logic. Here's the Answer:
Case
WHEN W1.Plex = 'Duplex' then (F1.images / 2)
Else F1.images
End AS Pages

SQL Server 2008 Replace substring [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a Screen table which has name and display_name columns. I am trying to replace the word Lawfirm with Law Firm in name and display_name columns for all the records of Screen table.
My SQL experience is pretty premature, I am wondering is there a way to achieve this using a SQL script?
Yes, you can do this:
update screen
set display_name = replace(display_name, 'Lawfirm', 'Law Firm')
where display_name like '%Lawfirm%';

How to delete all data > 70 characters in a column [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Can you help me to delete all characters > 70 in a "Title" column in dbo.tabs with a SQL script?
update dbo.Tabs
set Title = substring(Title,1,70);

Need to replace a part of a value in Sql Server 2005 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My table name is SOFTSKILL. One of Columns is MakeID. The values in the column are,
000277755
000278143
000277738
000277051
i need to change 000 into 100, like
100277755
100278143
100277738
100277051
Anybody please help me how to do this..
UPDATE SOFTSKILL
SET MakeId = STUFF(MakeId,1,1,'1')
WHERE MakeId LIKE '000%'