I have a column in my sql server table JobCharge Decimal(18,2)
Now I am running this query
Select CAST(JobCharge as DECIMAL(18,15)) from Journal
And I am getting this error - Arithmetic overflow…
We have a database which is refreshed three times throughout the day via SSIS. To minimize downtime we populate an identical staging database and then "swap" the production DB with the staging DB. …
Hello, I need your help to write a view that will remove the middle name initial and suffix from a single full_name field.
a) The middle name and suffix can be in the beginning, …
I have three tables for holding salary master data.
tblMaster has columns of:
I am using sql server 2014
How would I edit the following code spinet so that I get 1000 sequential rows instead of 100.
CREATE TABLE Table1
([Folder] int, [casefile] varchar(20))
I have 5 different tables in which I want to create a new record, pass a value to it and return the primary key of the newly inserted record. I can not see the sense in creating 5 sproc to do this …
I have a Function which might return a Null Value. As you can see I am using vbNull which is failing "Invalid use of Null".
How should I test for this?
Is someone use the NOLOCK command in a view like below.
Select col1, col2, col3 from view1 with (nolock) does this impact the view definition that tables are inside the view? and set the …
Working is SQL server 2005 using SSMS 16
I have a stored procedure in a database exec get_info 'ID175143'
Msg 2812, Level 16, State 62, Line 22
Could not find stored procedure 'get_info'.
I am using MS SQL Server 2014, the database is running in 2008 compatibility mode. The page I am working with is written in Classical ASP and, must for now, stay that way.
I am having a bad time …
I have below scenario and in SQL i want to display ID of first max value. I want to display 5 because it has first max value
is there any specific best practices on how and when to change page verification in MSSQL from torn page to checksum - and any specific precautions we should take before/after if it causes issues? is …
Have you ever had situations where a backup of a SQL database would not restore, and if so what kinds of issues can mean a SQL backup cannot restore into a live or test instance. we are reviewing how …
I am looking at the security of a progress database (now openedge). I wondered what the equivalent tool to SQL Server management studio would be for connecting to a progress/openedge database, to …
Not sure why this isn't working from SSMS. Working fine from a command prompt
A few years ago I put the following code together which connected to an SQL server on my network and returned a list of available databases on that server. I have returned to this project to …
I have the following code
I have a form with two fields (From & To) dates. I am trying to filter the report to display only the records between the two dates. What is wrong with…
Right now, i am doing migration from SQL server to oracle. In sql server, some stored procedures contains keyword like
sp_xml_preparedocument, openXML, sp_xml_removedocument,
I think, they …
right now configuration some test on SQL server 2014 transaction replication and we receive the following error:
it seems that the mentioned error was due to …
Is there any free tool which can automatically build the ERD (Enterprise Relationship diagram) of a Database ? (What I was looking is a diagram which shows the relationships based on …
I found a sample code online to get the last part of a string.
This is SQL 2016. I need to get the digits (4576893 for example)
This works. You see there is no forward slash after 4576893
Its has been years since I wrote a curser and was hoping for some guidence.
Lets say I have a select statement that returns me a unique list of Customers
So here is the select
I would like to know what is the 'size' specification for the input parameter type for adDBDate .
Seems I can find the size for everything but that one. Thank you.
Below is my code:
Trying to filter by current Month in a table. I know I can use the "m" but not sure what to replace it with.
We have a pair of 2012 R2 servers clustered together with SQL 2012. Recently when we attempt to attach a database and associated log file we get the attached error. We are unaware of or even if any …