I agree, the linked server query (with 3 dot notation) will be more efficient, but only if you are having the link server pointing to some native databases (e.g. MS SQL Server).
But if the link server is pointing to a ODBC DSN, then the pass through query will be more efficient.
I am not...
And may be if you have DATE also stored in some column, then you need to add 1 day in case when the value of TIME field is 24:00
Just a thought after going through the thread...
Can you put the result of following query here:
SELECT SUM(r.entry_amt), SUM(r.entry_amt*.035), SUM(r.entry_amt)+SUM(r.entry_amt*.035) AS AMOUNT
May be this helps in getting the cause of error.
It looks that you require a composite primary key.
You can use following statement to create this:
alter table TABLENAME add constraint pk_TABLENAME primary key (cu_id, email_address)
Though, consider that if any of these columns are nullable, then you first need to make them "not null".
R
Hello gjsaturday,
The solution pointed above are able to solve your problem. But if you don't have a very large set of data then probably you can use the following query for the time being:
----------------------------------------------
select c.name,b.name, e.date, sum(e.bal)
from
table1 a...
I have created a Com+ server application in the Windows 2003 server. When I instal the MSI file in windows 2000 machine it give me error that "error Registering COM+ application". While exporting the application i have checked the option "save the application in Com+ 1 format
While creating the...
Suppose i have a table with following definition.
CREATE TABLE myTable (col1 Int, col2 Varchar(10))
Now I want to add one more column colX (datetime) in between col1 & col2. So the new table structure should be like
col1 Int, colX Datetime, col2 Varchar(10)
Previously, i was doing this by...
Hi Robert,
I am not sure if there is any inbuilt function to do this formating in T-SQL. But like your command the following can also be used:
----------
RIGHT('0'+CONVERT(VARCHAR, @intNumber1),2)+' / '+
RIGHT('0'+CONVERT(VARCHAR, @intNumber2),2)
----------
But you may like to check the...
Hi Tim, swampboggie
I am not sure about the above query's where clause. It looks to me something complex.
What about the following query (if i have not understood the problem correctly)
-----------------------------------------------
update ppd2002
set previoustestdate = (select...
Hi mtl77,
The query of jackfl give you the required results after you modify a little bit. That is just remove the DESC from the query and it will work.
---
Raj
Hi Leslie,
I think that you have to use like operator. But i am sure that you will get what you want by using the like operator properly.
e.g.
starting with 'smit' ---- WHERE defnam like 'smit%'
ending with 'smit' ---- WHERE defnam like '%smit'
containing 'smit' ---- WHERE defnam like...
Hi nread,
I think that it is your connection settings, that why you are getting the wrong resulst. Otherwise the command is perfect.
Just go to Connections tabl under TOOLS-->OPTIONS. And un-check the 'Use regional settings when displaying currency, number, dates, and times'. After doing this...
gust1480,
Ooops! Sorry.
First i was writing something and then end up with something else.
just the line without datalength function will work.
i.e.
select * from table
where (isnull(rtrim(myField),' ')) = ' '
But i feel that claire has given a better idea.
Thanks claire. I have not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.