I have a column with text/sentences that may include strings starting with ‘@’. I need to remove all strings starting with ‘@’ from the texts. For example: Is there any function that can do the trick? I have tried the following but this removes only the ‘@’ from the string:…
Tag: sql
PHP update record button not passing information to another page
im trying to make a update record button on php that when clicked, it’ll take you to another page showing only the information of the patient which update button was pressed. Im using the following to show the patient information along with an update button for each patient patients.php When I click the…
Add a new column from compare result
I need add a new column (status) on my main table (Table 1) on my bd Postgres, to do this , I need to compare two columns from table 1 on table 2 , if the two columns exist , I need to copy the status from table 2 to the new column on table 1 , if not exist
check statement add constraint
create table sallaary( ); Now, this is my code. The idea of the first constraint “check_hours ” is to add a bonus to the employee if his work hours exceeded 40 hours but I don’t know how to write it Note: the first constraint “check_hours ” is not complete Answer Hmmm . . . I thi…
How to GROUP BY first column and choose string from second one depends on number in third one?
I have a problem with GROUP BY one column and choose second column that is string depends on Count number from column three. So I have a table with ID’s in column one, string in column two and Count in column three. I have ordered that by ID’s and Count descending. Most of the ID’s are uniqu…
Oracle SQL in HR Schema Write a query to display “How many characters are there in each employee’s last name before the first ‘e’ or ‘E’ appears?”
Write a query to display “How many characters are there in each employee’s last name before the first ‘e’ or ‘E’ appears?” Answer That is pretty much what the built in function INSTR() does – well, technically, it finds the positions of the ‘e’ so what you want is one…
Performance issue using IsNull function in the Select statement
I have a financial application. I have ViewHistoricInstrumentValue which has rows like this My views are complicated but the db itself is small (4000 transactions). ViewHistoricInstrumentValue was executed in less than 1 second before I added the next CTE to the view. After that it takes 26s. ActualEvaluation…
Loading table values into a poplist, current value displaying correctly
I have two tables in my library database, Books and BookTypes: When I load the Edit screen from my search results page, I have got the three types displaying. But can’t get the currently selected value of the book to display(It’s always Digital). My Edit Page Code is: How do I ensure the current v…
SSIS package works in debug mode, but hangs at step 2 when launched from the SQL Server job
Have a bit of a strange question here. We had a job in SQL Server that was being suspended on step 2 of an SSIS package. However whern I run the SSIS package in DEBUG mode it works fine. However if I launch the job from SQL Server it hangs at step 2. Step 2 basically returns about 2 million
MySQL Query to combine two tables
I’m trying to get a MySQL query to combine two tables. Both tables have a user_id and date column and the other columns are unique to each table. What I’m looking to accomplish is best explained with an image (imgur). I’ve tried various joins and unions and can’t get the right combinat…