Making A Select Between Two Diferent SQL Servers...Urgent Please Help

Mar 16, 2004

Hi there friend...I'm in a midle of a program(vb.net). and i've got this problem, I've got do compare two tables from two diferent sql servers. Is this possible??? How can I do this???





Please, this is really urgent.





Thank you for your attention

View 2 Replies


ADVERTISEMENT

Case Not Making The Select?

Aug 2, 2013

The following code is a front end parameter - Quantity but when the user enters '0' it is not returning any rows (there are). Is there something wrong here or to add something?

(Select {?Quantity}
CASE "ALL":
1=1
CASE "Negative":
({ACBALMPK.IRQOH#}<0) OR ({ACBALMPK.IEQOH#}<0)
CASE "Zero":
({ACBALMPK.IRQOH#}=0) OR ({ACBALMPK.IEQOH#}=0)
CASE "Greater than Zero":
({ACBALMPK.IRQOH#}>0;) OR ({ACBALMPK.IEQOH#}>0;))

View 4 Replies View Related

T-SQL (SS2K8) :: Making Two Select Statements Into One

Oct 13, 2014

I have a scenario where the second SELECT statement in my query has to be removed such that the logic needs to be included in the CTE select statement itself.

How this can be done? The columns in the final SELECT statement is having bit complexity.

My query is below:

WITH Local_EOL_Dioxin_Statistic_Import_New
AS
(
SELECT
CASE
WHEN ISNUMERIC(vr.stringValue) = 1 THEN vr.stringValue

[Code] .........

View 6 Replies View Related

Linked Servers: URGENT!!

Jan 22, 2001

can anyone give the syntax for executing a stored procedure which is sitting on server1 from server2. Name of the server1 is having dashes in it like
'a-b-c'.

I am trying to run something like this from server2 using linked servers concept.Servers are successfully linked.But I am not able to run the query from server2.Here is the error I am getting.


Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'b'.

Apparently because of the dash in the name of the server1. Can anyone give me the correct syntax here??
Thanks!

View 1 Replies View Related

Diferent Between Sql 2005 X86 And X64 ?

Jun 16, 2007

I have  AMD X2 64 bit processor, and try to install sql server 2005 developer edition. Which one should I choose x86 or x64 ?Is there a problems if I migrating file database from x86 platform to x64 and from x64 to x86 ? thanx 

View 3 Replies View Related

Moving Users And Permissions Between Servers--urgent

Nov 15, 2000

Is there any easy way to move users between SQL Servers for a particular database?
We have tests and development servers I would like to make sure the user lists are in sync for that db.

Thanks

View 1 Replies View Related

SQL Interation Of Diferent Colections

Jul 10, 2007

Hi,



My name is daniel ledesma, I have a little problem here...



How I can make so that two different collation' s in different languages, interact to each other, with no need to change constantly configuration to the PC (Software or Hardware)?

These two collation' s are Moder Spanish and Chinese.



Please... is URGENT I NEED HELP!!!

View 6 Replies View Related

What Are The Diferent Types Of Replication In SQL Terms ?

Mar 7, 2008



I want to know about types of replications used in SQL environment ?

View 3 Replies View Related

Filters Whith Diferent Values (parameters)

Apr 11, 2006

I want to make a filtering by using a string parameter (a,b).
The initial result of my query is this:

Name Letter
Luis a
Juan b
Michel c

Note: There are 2 columns (Name) and (letter)

So after filtering the result pane should be like this

Name Letter
Luis a
Juan b

If i send a diferent filtering parameter (b), the result should change like this

Name Letter
Juan b

How can I do this??

Thyanks

View 2 Replies View Related

Calculating Textboxes Values Grouped In Diferent Lists

May 7, 2007

I have to Lists filtered by the same field. One List shows all records with the field IsClokedIn value = TRUE and the other list =FALSE. I have only one dataset that retrieve the ClockIn and Clock out for one user. In a perfect world, the user MUST clock in and always clock out. So, when i created my dataset i ordered by UserClockingID (whick is primary key). So, this MUST retrieve a dataset with alternate records IN / OUT (TRUE or FALSE)

Ex.

UserClokingID UserID Time IsClockedIN

2323 34 8:32:03 TRUE

2324 34 12:07:02 FALSE

2325 34 13:05:03 TRUE

2326 34 14:53:02 FALSE

2327 34 15:10:03 TRUE

2328 34 17:32:02 FALSE



All i need is to calculate (sum then divide by 60) the minutes returned by the method DateDiff between the first row in my TRUE filtered list and the first row in my FALSE filetered list... and so on for the 2nd, 3rd ..... I can get the minutes by taking the values directly from the Fields!IsClockedIn.Value and using a condition to "grab" the previous record if the current record ClockedIn.Value=FALSE. I already did that.

my problem is that when i try to perform a calculation of textboxes values(those with the ammount of minutes for every pair of records from the datalist) out of the group. It says you can only do that inside the group or dataregion.

Is there any work around?



I really need to get this solved.

View 2 Replies View Related

Select Into Across Linked Servers

Sep 28, 2007

Hi. I'm trying to copy from one table to another across 2 differentservers with the following:select *into #Tmp_Hdrfrom parsaleshdrwhere businessday = '9/20/07'select *into [pdsqla01pdsqla01].impact_exec.dbo.parsaleshdrfrom #Tmp_HdrThis gives me an error:The object name 'pdsqla01pdsqla01.impact_exec.dbo.' contains morethan the maximum number of prefixes. The maximum is 2.Not really sure how to get around it. I was trying to use OpenQuery,but that's really for selecting from, not into. How can I get aroundthis?Thanks,Jennifer

View 1 Replies View Related

Select Data From Two Databases On Different Servers

Oct 27, 1999

Hi there,
I was just wondering is it possible to select data from two different databases on two different servers?

ie Select * from
Server1.databasename..table, Server2.databasename..table


If anyone has any suggestions they would be appreciated,
Thanks,
Fin

View 2 Replies View Related

Performing Select Stmts. Using 2 Servers

May 25, 2002

It just seems like I should be able to use a 4 part naming convention to compare database tables that exist on 2 servers. It isn't always possible to link dbs because of security. Is there any other way to query between servers?

Thanks!

View 3 Replies View Related

SELECT Rowguidcol From Tables On Linked Servers?

Apr 25, 2008

I've run into the following problem using "select rowguidcol from [LinkedServer].[DBName].dbo.MyTable" (as opposed to using "select <rowguid column name>...".

Against a locally-connected database, the following SQL command works as expected:

SELECT rowguidcol from dbo.MyTable

However, If I run the same query against a linked server (using the 4-part notation), it fails with an 'Invalid column name 'rowguidcol'' error:

SELECT rowguidcol from [LinkedServer].[MyDB].dbo.MyTable

Msg 207, Level 16, State 1, Line 1
Invalid column name 'rowguidcol'.

I've searched around but can't seem to find any info that tells me definitively that I can't use rowguidcol against linked tables, so I'm wondering if I'm just doing something wrong?

Any ideas on how to get around this issue would be greatly appreciated. I really don't want to use actual column names, as this is for generated scripts.

More Info:
> I can select the data just fine from the linked server if I use the column name - so I don't think it's a configuration or permissions issue.

> The row I'm trying to view is, in fact, a rowguidcol. I used the exact same script to create the table on both the local (where select rowguidcol works) and the linked (where it doesn't) servers.

> Both servers are MS SQL 2005 Standard with SP2

View 1 Replies View Related

Linked Servers: SELECT * INTO Doesn&#39;t Work

Sep 21, 2001

I administer several servers. My login is a SysAdmin on all servers with not only the same Name and Password, but also the same SID. In setting up Linked Servers, I can successfully SELECT data from a server other than the host server, but if I try to SELECT * INTO I get the following error:

The object name 'DB1.ogSerial.dbo.' contains more than the maximum number of prefixes. The maximum is 2.

Here are the queries I've tried (using DB3 as the host, DB1 as the linked server).

SELECT * INTO DB1.MyDB.dbo.TestTableNew FROM DB3.MyDB.dbo.TestTable
SELECT * INTO DB1.MyDB.dbo.TestTableNew FROM DB1.MyDB.dbo.TestTable
SELECT * INTO DB1.MyDB.dbo.TestTableNew FROM MyDB.dbo.TestTable

View 3 Replies View Related

Urgent: BETWEEN In A SELECT Statement

Jan 25, 2007

Hi, i wanted to take all the orderID that fall between a certain date. I was thinking of using this syntax... Dim sql as string = "SELECT orderID " & _
"FROM orders " & _
"WHERE orderDate BETWEEN 11/11/2007 AND 15/11/2007"
 in my database i set the date to nvarchar, not date... so will this syntax works??
thx

View 14 Replies View Related

Nested Select, Urgent

Jan 8, 2002

I have two tables with the following data:

TableA: Serial_No
A
B
C

TableB: Serial_No
A
B

I need to retrieve the Serial_No in TableA but does not exist in TableB, in this case, data is "C".

I have tried the following Select statements:

1.
Select TableA.SerialNo
From TableA
Where TableA.SerialNo IN
(SELECT TableA.SerialNo
From TableB
Where TableA.SerialNo <> TableB.SerialNo )

2.
Select Distinct TableA.SerialNo
From TableA
Join TableB on
TableA.SerialNo <> TableB.SerialNo


However, the two statement gives me all data, i.e., A,B,C.

How should I discard the unwanted row?

Your help is greatly appreciated.

Thanks & Regards
MMC

View 3 Replies View Related

Select Statement (urgent)

Nov 1, 2007

my current stored procedure generates the following data

name type hours
Mike A 1
Mike A 2
Mike A 1
Bob A 1

Bob B 3


what i want is this:



name type hours
Mike A 4

Bob B 1

Bob B 3



and here is what i have

select departmet,name,sum(hours),

Case


when.... then .......

when.... then .......

when.... then .......

Else 'A'

End as Type

from tableA

Group by departmet,name


Any thoughts!
Thnks



View 8 Replies View Related

URGENT - Select Distinct Date

Oct 10, 2005

Hi, I have a query as follows:select transactionDate, (select count(transID) from ......)I am having a problem which is that dates are not shown uniquely.For example,oct 1, 2005 00:12:00 - 12oct 1, 2005 01:30:00 - 12oct 1, 2005 01:13:00 - 12I want only to have:oct 1, 2005 01:13:00 - 12The select is working on time and not on a date, can you help me please?thank you.

View 1 Replies View Related

Using Case In A Select Statement,urgent!

Feb 15, 2002

Hi All,

I need a hand in this script.
SELECT a.id ,value = CASE
when (x1-x0) = 0 then
((Y2-Y0)-(Y1-Y0))/(0.000000001*(X2-X0))
ELSE
((-111.48277-Y0)-(Y1-Y0))/((X1-X0)*(32.72383-X0))
END
,value2 = CASE
when (x1-x0) = 0 then
((Y2-Y0)-(Y1-Y0))/(0.000000001*(X2-X0))
ELSE
((-111.48277-Y0)-(Y1-Y0))/((X1-X0)*(32.72383-X0))
END
FROM table_name a
where value > 0
ORDER BY VALUE

The problem I'm having is in the where clause. Because the value is not a column name sql server is giving me an error. I need to evaluate the value returned. How can I get around this problem? Any sort of advise will help!
Thank you in advance!

View 1 Replies View Related

How This Select Statment Works Please It Is Urgent?

Apr 21, 2007

hey friends!
pleaze help, i am using sql server 2000.i have tried to fix my problem for more than five weeks just to solve for one problem and just still now it is unsolved, opps my due date is almost approaching, i don't know what to do more than what i did, i have search through the net, but still i did not get the correct answer to my problem, friends please just forward your answer to me, it may be best answer to my question .
create table mytable( english varchar(120), tigrigna Nvarchar(120))
insert into mytable values('peace',N'sälam')
insert into mytable values('kiss',N'samä ')
insert into mytable values('to kiss each other',N'täsasamä ')
then
select * from mytable where english='peace'; this works fine
but
select * from mytable where tigrigna=N'sälam'; this doesnot work;
select * from mytable where tigrigna='sälam'; this also doesnot work,
so what should i do to select this unicode select statement?

tigrigna is one of the spoken language in east africa(ethiopia).
Hopefully, i have joined this forum today, and just looking for your reply

I am Looking for your reply !

View 1 Replies View Related

Challenging Select Statement (urgent)

Feb 6, 2008

Here is table dbo.vw_TimebyProjectAll

proj_name res_name yr SumOfHours
x Mike 2007 1
x Mike 2008 2
x Mike 2008 3


Here is table dbo._LastWeekTotalHours

proj_name res_name yr td_hours Week
x Mike 2007 1 1
x Mike 2008 2 8
x Mike 2008 3 9

now here is what the output should look like

Lets assume the user well enter 8 for week number

proj_name res_name totalHours LastWeekHours
x Mike 6 2
Y AJ .. €¦.

I am trying to write a select statement for that:

Here is what I have:

SELECT a.proj_name, a.res_name,a.TotalHours,g.TotalHours as LastWeekhours
FROM

Line 1( SELECT r.proj_name,r.res_name, SUM(r.td_hours) AS TotalHours FROM
line 2 dbo._LastWeekTotalHours as r, _vw_Employee as e
Line 3 WHERE e.RES_NAME = r.res_name and r.Week = 5 and r.yr = 2008
Line 4 GROUP BY r.proj_name, r.res_name ) as g

Line 5(SELECT r.proj_name, r.res_name, r.TotalHours
Line 6 FROM
Line 7 (SELECT proj_name, res_name, SUM(td_hours) AS TotalHours FROM
line 8 dbo._LastWeekTotalHours
line 9 GROUP BY proj_name, res_name ) r ,
line 10 (SELECT proj_name, res_name, SUM(SumOfHours) AS TotalHours FROM
dbo.vw_TimebyProjectAll
line13 GROUP BY proj_name, res_name )w
)a

if i excute line 1 - 4 i will get the last week hour correctly
if i excute line 5 - 13 i will get the totalhours correctly





my problem i can't put these two pieces work togather. feel free to re-write the select statment
thanks

View 14 Replies View Related

SELECT TOP 25 PERCENT Bug - Please, Need Urgent Response!

Mar 13, 2008

Script below returns 29 rows, must return 28!


Code Snippet
use master
select top 25 percent
id
from
(
select top 112
*
from
syscolumns
) d
order by
id desc






Script below returns 57 rows, must return 56!


Code Snippet
use master
select top 50 percent
id
from
(
select top 112
*
from
syscolumns
) d
order by
id desc





Reproducable on

Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

and

Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

Could anyone from MS SQL server team clarify what's happened and WHAT TO DO?

View 4 Replies View Related

Stored Procedure In SELECT Statement?? Urgent

Sep 26, 2001

I have a stored procedure in an Informix-database that returns a string. Its used in a SELECT statement like this.
SELECT t1.id, t2.id, sp_name(t1.id, t2.id) FROM table1 t1, table2 t2

I want to write it in SQLserver. I have tried this syntax but get error.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 't'.

SELECT t1.id, t2.id, dbo.sp_name(t1.id, t2.id, "") FROM table1 t1, table2 t2

Can I use stored proc in this way in SQL-server?

View 2 Replies View Related

(URGENT)restricting The No. Of Records Resulted From A Select Query

Jun 3, 1999

dear friend,


i run a sql command like this
select * from table_name
what i want is that if no. of records found are greater then 500 than it should stop the query and only show those 500 records dont go further and stop the process
waiting for reply
ashish bhatnagar

View 1 Replies View Related

URGENT HELP PLS: Select Substring('NY',status/1024&&1+1,1) From Master..sysdatabases Where Name=DB_NAME()

Jul 20, 2005

Hi Everyone,All the very best for 2004!!i need urgent help with this problem, the users are about to skin mealive!!we have an access front end with linked to sql server 2k tables.when a user tries to insert a record into one of the tables it"randomly" returns a generic ODBC error and fails to save. on otheroccasions the same record will save.a trace was applied and the following select seemed to appear rightafter the insert statement whenever it failed:select substring('NY',status/1024&1+1,1) from master..sysdatabaseswhere name=DB_NAME()i had a look at other articles in the groups re this select statement,but could not find a clear answer.i have tried the insert statements as both SQL pass throughs and justplain docmd.runsql'scan someone help me with the following:* what is the purpose of the select?* what other investigations can i do to get more info on why thisshould be happening?* how can i stop it?the table i am doing the inserts into is showing as have a numericdata type field in sqlserver, but the linked table shows this numericfield as text - could this be the problem?? this field is not used inthe insert statement.i could not find any references in the MS knowledge base.any and all help would very gratefully received.Edwinah63

View 2 Replies View Related

Sql Report Works Fine On Internal Servers - Hosed On External Servers - Need Some Help

Nov 21, 2007

I have a report that was designed using SQL Reporting Services that sits on a SQL reporting server. It's nothing too exciting, it is essentially a three page application with legal jumbo on pages 2 and 3 and applicant data in fields on page 1.

We use rectangles to force page breaks to page 2 and to page 3.

When running the report on the report server, it shows and prints fine.

When running the report from the QA website internally, it shows and prints just fine.

When running the report from the production website from a machine internally, it shows and prints just fine.

When running the report from outside of the company network, the report is jacked. It obliterates large chunks of text, crams text together, and creates blank pages.

I need help in determining where I even begin with trouble shooting this!

View 1 Replies View Related

Development Servers, Auto-update Live Servers

Aug 21, 2001

can anyone tell me if they know of a way to automate the update process from development servers to live server, with little interference from an administrator

I have a development team that are constantly updating their databases along with their ASP code, and want to publish changes an a weekly basis. They have asked me for a way to take their new structures, tables, procedures etc, and copy them to the live servers, but NOT to interfere with existing customer data.

Funny I know – and I hate the idea btw :(

Any references, contacts, 3rd party tool recommendations welcome,

Thanx,

Darren

View 1 Replies View Related

Linking SQL 2005 Servers To SQL 2000 Servers Problems

Sep 27, 2007

I am in the middle of a major migraton project, moving from x86 SQL 2000 to IA64 SQL 2005. I have a business need to link to several legacy servers. I have a number of problems I am trying to solve.

1) Linking a Kerberos server to a non-Kerberos server.
2) Linking x64 or IA64 servers to x86 servers.
3) Linking SQL 2005 to SQL 2000.

Two of the errors I am encountering are:
------------------------------
TCP Provider: An existing connection was forcibly closed by the remote host.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
OLE DB provider "SQLNCLI" for linked server "SCDC250DB" returned message "Communication link failure".
(Microsoft SQL Server, Error: 10054)
------------------------------
And
------------------------------
The OLE DB provider "SQLNCLI" for the linked server "SCDC250DB" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "SCDC250DB".
OLE DB provider "SQLCLI" for linked server "SCDC250DB" returned message "Invalid authorization specification".
(Microsoft SQL Server, Error: 7399)

If someone has worked through these problems before, I would appreciate it if you could direct me to the relevant documentation to resolve these issues.

Thanks!


Brandon Forest

Database Administrator

Data & Web Services Team

Sutter Connect Information Technologyforesb@sutterhealth.org

View 2 Replies View Related

Select Data From Diff. Tables On Diff. Servers

Feb 12, 1999

I need to write a 'select' statement to fetch data from different tables, which are located on different servers.
Can any one help in writing this 'select' statement with out moving the tables on to same server.


Thanks in Advance.

Murali Raparla.

View 2 Replies View Related

Timeout Expired -- URGENT, URGENT, URGENT!!!

Sep 27, 2000

This morning I can not connect to our SQL Server 7.0 whatever from client or server. The error message which I list below:

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++
A connection could not be estabished to server--Timeout expired
Please verfy SQL Server is running and check your SQL Server registration properties and try again.
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++

We use windows NT authentication. We did not do any change on NT. The SQL Server daily schedule job usally stoped at 10:00AM, but today from the Window NT Task Manager, we can see that the SQL Server is still running untill now.

Please help!!!

View 3 Replies View Related

URGENT.Sql Server Does Not Recognise MAPI , Or Profile Name URGENT

Oct 26, 2000

hi, I have settup up sql mail and did the following:
1. created an E-mail account and configured Out look by creating a pop3 mail profile. tested it by sending and receiving mail, that is ook
2. I Created one domain account for MSsqlserver and Sql Agent service. both services use same account and start automatically in the control panel-services
3. I used the profile that I created in outlook to test the sql mail but got an error:
Error 22030 : A MAPI error ( error number:273) occurred: MapiLogon Ex Failed due to MAPI
Error 273: MAPI Logon Failed

I really do not know what went wrong. I followed the steps from bol and still having a problem. Am I missing something.

I do have a valid email account
I do have a valid domain account
I tested outlook using the email account and it worked. so why sql server does not recognise MAPI.

My next question, How to configure MAPI in Sql server if what I did was wrong.

View 1 Replies View Related

Urgent, Urgent !! My Sql Server Refused To Start Due To Encrypton

Mar 23, 2001

Hi, I have 2 windows 2000 server in cluster with sql server 2000 enterprise edition installed.
I have activated the Server-Requested Encryption by using the sql server network utility (Force Protocol Encryption). After this, I have stoped sql server service. But I can't start it at this moment.
The error is:
19015: The encrypton is required but no available certificat has been found.

Please help me to start sql server.

Thanks.

Michel

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved