Hi,
I am having difficulty writing case statements for sql (please see code below).
Any help appreciated.
Cheers.
hello EE
i face an interesting task!
i have a list of countries:
$cntry_list='United Kingdom,Austria,Belarus,Belgium,Bulgaria,Croatia,Czech Republic,......";
i need to select from my DB ...
I have an SQL database, we'll cal it DB "A" , which is my primary database, however for some of my queries I need to link to another SQL database (on a different server) on a read only basis....
hello, I want my query to only list records where the field [CO].[ORDER_DATE] is not equal to the field [ PR].[DATE] plus 1-7 DAYS
please add it to my attached SQL, for me to copy/paste
...
I have a query thats based on several tables.
I've liked to add a field that show the number of the record in the query. So that it looks something like
1 Arac02
2 Blah06
3 Crop01
T...
Hi Expert, i have a table with data and i want to use distinct and order by for the sql statment
for example
Table 1:
vno vName vDate
---------------------------------
1 ...
So on the statement below I what it to get the IX.Amount when it's in any of those IX.XActType's as you can see. There may or may not be a transaction for any on these a,b,c,d,f,j,m,n,o,q,s,t...
I need to update a date field by an incremental amount until it is greater then the current date / time.
It needs to be updated in such a way that if the date is 9/11/08 3:00:00 and we are ad...
In my select I have Item Description that I don't want to group by below but I have to because it's not an aggregate function. Is there anyway to get around this or do it a different way?
I am using the attached T-SQL query in a SQL Server 2005 Reporting Services report. The challenge is that whenever Billed_Hours = 0, I also need Billable_Hours to equal 0. What is the best way...
I have an access 2003 database, on which I query from an excel macro. Query (simplified) attached. As part of this query I want to return, for each `horse name` in cell A1, the number of ent...
The Code as it is:
DECLARE @Reason AS ntext
SELECT @Reason = Reason FROM Table1 WHERE ID=@ID
INSERT INTO Table2 (Col1,Col2,Reason)
VALUES (@Col1, @Col2, @Reason)
In SQL Server 2000, I...
Hi,
I want to compare if a variable date is greater than NOW. I am not interested in the time part of it, just the actual date value, something like I am trying to achieve below would be gr...
I am trying to setup an SQL Query by limiting the CreationDate value in the records fetched to fall between to dates passed by the user.
The target database is Acess2000 over ODBC. The tar...
Hi Everyone-
I have attached the code for a class project. i was hoping someone would look at the Foreign key requirement in the desigh document and look to see if my code meets the requir...
Hi experts,
I have the following SQL statement:
SELECT DISTINCT XKIncidentTasks.IncidentTaskID, XKIncidentTasks.Sequence, XKIncidentTasks.IncidentTask, XKIncidentTasks.IncidentTaskDurat...
I have a temp table that is created as follows...
Select
ID
Name
Interest
INSERT INTO temp_table2
From temp_table1
Select
ID
Name
interest_2
INSERT INTO temp_table2
From temp...
I am using the following query:
select * FROM dbo.sur_response_answer
Where item_id='2560'
This Reports Back 851 Rows
I then use the following query:
select * FROM dbo.sur_respons...
I have a MySQL database that has data that I need in a couple of different tables. One table has the columns ID and Number (in addition to other things such as date, etc.), the second table h...
I would like to change field designation to allow Null or 0 to feilds in the Leads and Accounts tables in a MySQL DB. I am currently using Database Workbench, but I have MyPHP admin as well as...
Hello experts
I have a table Artextras
Artikel_ID Extras
253 10
256 20
264 20
264 10
264 40
264 50
264 60
And when i run the query:
SELE...
I'm not sure what I'm doing wrong here.. I have these two queries and both return positive values in the 1k+ range on their own. The first returns a value of 1277 and the second returns a va...
I currently have the following :
select AccountID, AccountName from Accounts
what I would like to try and do is if AccountName = Null or '' then display the AccountID as the AccountName ...
sql tables :
SHOP(shop_number,shop_name,shop_address,shop_owner)
CUSTOMER(cust_num,cust_name,cust_addr)
SUPPLIED(item_num,cust_num,shop_num,date,price)
How to :
(i) find the names of ...
The code snippet below brings results like the following:
SIN SIN SIN Year Year Year ... ... ... ... ... ... ... ...
NULL XXXXXXXXX XXXXXXXXX NULL 1987 1987 NULL ...