If I set the default value of a bit field to 0 using the Management Studio, save the change, and then look at the default value, it shows up as ((0)). The same is true for 1 and ((1)). What'...
Hello,
I have a table that I need to join with two other tables to pull in first and last names. Essentially what I want to do is add two columns to my main table (first and last name) and ...
I want to update the values in one table based on the city they are in which is located in another table. When I try to join the tables in my update command I get the following error message:...
This is probably a very simple question...
I would like to know how to create a dynamic Stored procedure that will return anything I ask..
like...
CREATE PROCEDURE usp_ReturnTemplated...
The following gets the first date of the current quarter:
TRUNC(sysdate,'Q')
is there a way to get the last day?
Greetings Experts,
I am having a problem writing a query that joins 2 tables on 2 fields (no unique fields available) AND I also want to calulate the sum of individual fields after the tab...
Creating a query over 2 tables. Both have date fields and I'm summing 2 columns on each of them
I want the query to return
YEAR SUM(ADJ LOSS ADDITION) SUM(ADJ LAE ADDITIONS) SUM(EXP ...
I am using SQL Server 2000 and I have created a user defined function named TT_GET_MARKUP2. The select statement of the function works in Microsoft's SQL Query Analyzer, but when I try to cre...
Below is the data set which I currently have by querying
UNIT NODE TYPE ACCOUNT SEQ
AA AB1 CON 677 1
AA AB1 ZBA 523 1
AA AB1 ZBA 504 1
AA AB1 STAND 555 2
AA AC1 CON 876 1
AA AC1 ZBA 4...
I need to work out the number of working days between two dates (i.e. excluding Saturdays and Sundays) that are stored in a table.
I've found two ways to this, and have attached the sql for...
I have a question in concerns with counting rows. I have two tables
table1
CaseID, UserID, CaseTitle, CaseDescription
Table2
ID, CaseID, CaseNotes
How can I create a stored procedu...
Hi,
I am using MSSQL 2000
In MS SQL I have to substring the middle integer from the string
For Example
If String is AS-00200-1
I want result as 200
If String is AS-00200-1
...
Can someone please help me to get this query to work.
SQL 2000 standard
Goal.
Display the amount of days an invoice is overdue by.
If it is not overdue then leave it blank.
SELECT i...
Hi,
having a table A which looks like
DATE CRIT1 CRIT2 CRIT3 X Y Z
1/1/1990 1/20/1990 ...
Objective: Update table dbo_LEASEBUT4 based on a value in table dbo_LEASEBUT7
The following Syntax::
update dbo_LEASEBUT4 set dbo_LeaseBut4.leasid = (select dbo_LeaseBut7.leasid from dbo_Le...
I keep getting the error:
Server: Msg 241, Level 16, State 1, Line 152
Syntax error converting datetime from character string.
I have 2 tables with product reference codes that are then merged into one table column alias using the following statement...
SELECT CASE RefCode1 WHEN '' THEN RefCode2 ELSE RefCode1 END A...
I need to create a job to clean up some data every night. I need to do a select statement (that joins multiple tables) and then loop through each record and do an update to one of the related...
I have an Acess 2003 table
I hve a total of 10 fields. I want to tkae two fields and match them up to another table with the same fields - if one field matches and the second field does not ...
Greetings Experts,
I have previously opened this question before and closed it thinking it was working. Apparently it isnt.
Here is the orginal question;
http://www.experts-exchange.c...
I have 5 spreadsheets. 4 represent one very large table placed on 4 sheets. One is a small seperate table with 3K records and one field in common with the large table placed on 4 sheets.
...
i want to take this query:
SELECT * , count( media_id ) AS songs_in_fav
FROM `jamroom_user_favorites`
GROUP BY user_id
ORDER BY songs_in_fav DESC
and use the data in column 'songs_in_...
What is the difference in the Order by and Group by syntax?
Please see the attached. Fig. 1 lists the raw data (two tables). Fig. 2 Shows the desired output.
Id like the output to merge the tables together, displaying the clients earliest start date...
The tbl EXPERIENCE has *many* records, as does the tbl PolicyTransaction. I am trying to update the zipcode column in EXPERIENCE with what is in PolicyTransaction (the zip in Exp are wrong). I...