Menu

📰
0

Reddit - Please wait for verification

News and Notes on the Structured Query Language·/u/Entire-Law-8495·2 days ago
#ah5KmhFJ
Reading 0:00
15s threshold

Hi all! I tagged this as oracle since I believe that’s the closest SQL format to PL/SQL. I tried to search this, but I’m not sure how to word it, so I’m not getting any hits. The data I’m looking at shows charges on an account. When the charge is initiated, column “RECORD_TYPE” will say “UNBILLED.” Once the charge is processed, an additional identical line will show up and the column will say “BILLED.” Now I’ve got two similar lines after the charge goes through, with one small difference in the “RECORD_TYPE” column. Is there a way to have the results only show one line? I’d love it if there was a way to have the “BILLED” line show up if it was charged but show the “UNBILLED” line if the charge has not been processed yet. I’ve tried cases and coalesce with no luck, but I may not be thinking of the best way to utilize them. Any advice? submitted by /u/Entire-Law-8495 [link] [comments]

Read More