I have the following Microsoft Access database structure: I am trying to create a C# function in the class book: Return(), that is used to return the book from the client that borrowed it. This is …
(SQL Server 2017) I get error Msg 8152 and I don’t know why
I have no idea why, but I am getting the error Msg 8152 (in SQL Server 2017) after trying to insert something like into the table The output I get is Msg 8152, Level 16, State 14, Line 1 String or binary data would be truncated. Thanks in advance for your help! Answer You need to define a length for
how to create pl sql function to Checking if data exists in database or not
I am trying to create a function that tells whether data exist in database or not. Trying to solve this using cursor if data exist then data will be fetched from database and value of temp will be TRUE otherwise data would not be fetched from DB and it will set value of temp to false. But when I compile
Load .txt file into Postgres Database
I created a new Postgresql table and I’m having trouble loading a .txt file into that table. I striped the headers out of the text file and tried loading the data but got this error: ERROR: extra …
remove results from query if group is null
I have the below table: Criteria: Do not show results for grpid if there is a null custuserid for all grpid grpid 145 should be seen as there is a custuserid on the second row. Custid grpid …
Is there a way to count all the trailing zeros in a column in MySQL?
I am looking to find out if there is a way to count the number of trailing zeros in a column. The column is made up of a maximum of 13 numbers as shown below and I want to count all the zeros before …
Is a cursor/recursion the only possible option here? Set based logic based on certain lag conditions
I’m using SQL Server, I have a table with 3 columns (timeseries) data, with date, hour beginning, AwardStatus. The award status for the most part is randomly generated. There can be two options, …
MySQL SELECT only rows where tbl_col equal to this and that
I am struggling a bit with my SQL query. This is the query i have now, and it works as is, but i want to add some more to it. In the mysql table, there is a column that is named “type”. I want to filter the rows and get the rows with the string “sms” or the string “email”
Subquery error calculating Free throw statistics
trying to incorporate the query titled “free throws made” as a subquery into the query below it titled “FreeThrowPercByGame” but getting an error. Both work independent of each other in Google Big …
TSQL – Parent Child (1 to zero/many) Grouping/Aggregation
Code (Sample Data Staging): Description: @Emp is the sample Employee table (Unique Employee records). EId = Employee Id FN = First Name LN = Last Name @EmpPhCont is the sample Employee Phone Contact table (Each Emp from @Emp table can have zero, one, or multiple phone numbers here – unique by Emp/Type).…