SQL Image field divided by 2 [closed] - sql

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

Related

How to perform an SQL update using TADOCommand? [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 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

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

Optimization of for loop in oracle [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 9 years ago.
Improve this question
I was asked on my apprenticeship following question:
Why query like:
FOR i in ( SELECT * FROM TABELKA) LOOP
is not efficient? How to change it to make it more efficient?
There is no further information added.
Collect, all data at once, into a collection. Boom! One query and you have it all without looping.
SELECT *
BULK COLLECT INTO a_collection_type_variable
FROM a_table;

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%'