Lost Some Space (hardisk) When Execute Query

Jul 7, 2004

Dear All,

Got some problem...
how come i lost some space (hardisk) when
execute query...
(the query is listed below)

I want to know is it create some virtual tables or view when we execute query ???
N where's the location in our hardisk ??

thx


Listed Query
---------------------
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Absen.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.DateAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
HRAbsensiKaryawan Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
Union
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.TglAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
ADMAbsensiKaryawan Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
UNION
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.TglAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
ADMAbsensiBulananSite Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
Union
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.DateAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
HRAbsensiKaryawanNonStaf Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
UNION
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.DateAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
HRAbsensiKaryawanStaf Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
UNION
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.TglAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
LCAbsensiBulananSite Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
UNION
SELECT Absen.BranchID, Bran.BranchName, Bran.BranchNote, Dis.DepartmentID,
Absen.SubDepartmentID, Dis.AfdelingID, Dis.WilayahID,
Dis.KemandoranCivilID, TekCiv.KemandoranCivilName, Absen.TglAbsensi as TglAbsensi,
Absen.AbsensiID, Absen.KaryawanID, Data.JabatanID1, Jab.JabatanName,
Data.GolonganID
FROM AMBranchMaster Bran RIGHT OUTER JOIN
HRDataKaryawan Data LEFT OUTER JOIN
HRDistribusiKaryawan Dis LEFT OUTER JOIN
TEKMasterKemandoranCivil TekCiv ON Dis.KemandoranCivilID = TekCiv.KemandoranCivilID ON
Data.KaryawanID = Dis.KaryawanID RIGHT OUTER JOIN
LCAbsensiIndirect Absen ON Data.KaryawanID = Absen.KaryawanID ON
Bran.BranchID = Absen.BranchID LEFT OUTER JOIN
HRMasterJabatan Jab ON Data.JabatanID1 = Jab.JabatanID
UNION
...................

----------------

View 2 Replies


ADVERTISEMENT

Help! The Transaction Log Is Full Error In SSIS Execute SQL Task When I Execute A DELETE SQL Query

Dec 6, 2006

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

View 5 Replies View Related

The Query Processor Ran Out Of Stack Space....Please Simplify The Query.

Oct 9, 2007



I received the following error today while migrating some code from SQL 2000 standard to SQL 2005 standard:

The query processor ran out of stack space during query optimization. Please simplify the query.

From what I gather, this error is usually an indication that one of the SQL Server 2005 maximum capacity specifications has been exceeded. However, I'm not sure which one. The only one that seems suspect is the number of nested subqueries (32), however I believe the numerous subqueries in my query would be classified as correlated rather than nested.

An example of my code is below. It is necessarily messy, as the output needs to be denormalized somewhat. Note that this runs just fine on SQL 2000, and it retrieves the 1500 or so rows of data in about 30 seconds. Thanks in advance for any ideas as to what may be causing this error. (Sorry for not using code-block, but all the html tags it threw in were exceeding the 50,000 character limit for the message)


BEGIN

SELECT

(SELECT Agent FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 1) AS A5,

(SELECT Agent FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 2) AS A6,

(SELECT Agent FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 3) AS A7,

(SELECT Agent FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 4) AS A8,

dbo.f_formatpseudodate(Accrued_Interest_To) AS AI,

dbo.f_getmiscdescription('AM', c.Card_Number, Amended) AS AM,

Basis_Shareblock_1 AS B1,

Basis_Shareblock_2 AS B2,

Basis_Shareblock_3 AS B3,

Basis_Shareblock_4 AS B4,

Basis AS BS,

dbo.f_getmiscdescription('C1', c.Card_Number, Price_Code_1) AS C1,

dbo.f_getmiscdescription('C2', c.Card_Number, Price_Code_2) AS C2,

dbo.f_getmiscdescription('C3', c.Card_Number, Price_Code_3) AS C3,

dbo.f_getmiscdescription('C4', c.Card_Number, Price_Code_4) AS C4,

dbo.f_getmiscdescription('C5', c.Card_Number, Price_Code_5) AS C5,

dbo.f_getmiscdescription('C6', c.Card_Number, Price_Code_6) AS C6,

CAST(Card_Date AS smalldatetime) AS CD,

c.Card_Number AS CN,

dbo.f_getisocurrencycode(Currency_Code) AS CR,

Card_Status AS CS,

dbo.f_formatpseudodate(Record_Date) AS CT,

Currency_Description AS CU,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 1) AS D1,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 2) AS D2,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 3) AS D3,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 4) AS D4,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 5) AS D5,

(SELECT New_Issue_Description FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 6) AS D6,

dbo.f_formatboolean(Dutch_Auction) AS DA,

dbo.f_formatpseudodate(Dated_Date) AS DD,

dbo.f_getmiscdescription('DI', c.Card_Number, Distribution_In) AS DI,

Dealer_Manager_2 AS DL,

Dealer_Manager_1 AS DM,

dbo.f_getmiscdescription('DV', c.Card_Number, Dividend_In) AS DV,

Basis_Surrender_1 AS E1,

Basis_Receive_1_1 AS E2,

Basis_Amount_1_1 AS E3,

Basis_CUSIP_1_1 AS E4,

Basis_Receive_1_2 AS E5,

Basis_Amount_1_2 AS E6,

Basis_CUSIP_1_2 AS E7,

Basis_Receive_1_3 AS E8,

Basis_Amount_1_3 AS E9,

dbo.f_getmiscdescription('EC', c.Card_Number, Record_Date_Code) AS EC,

Equity_Debt AS ED,

dbo.f_getmiscdescription('EF', c.Card_Number, Effective_Date_Code) AS EF,

dbo.f_getmiscdescription('EX', c.Card_Number, Expiration_Date_Code) AS EX,

dbo.f_getmiscdescription('F1', c.Card_Number, Refer_Code_1) AS F1,

dbo.f_getmiscdescription('F2', c.Card_Number, Refer_Code_2) AS F2,

dbo.f_getmiscdescription('F3', c.Card_Number, Refer_Code_3) AS F3,

dbo.f_formatpseudodate(Effective_Date) AS FD,

File_Activity_Type AS FT,

dbo.f_getmiscdescription('G1', c.Card_Number, Rights_Ratio_1) AS G1,

dbo.f_getmiscdescription('G2', c.Card_Number, Rights_Ratio_2) AS G2,

dbo.f_getmiscdescription('G3', c.Card_Number, Rights_Ratio_3) AS G3,

RTRIM(LTRIM(Original_Card_Number)) AS GC,

dbo.f_getmiscdescription('GD', c.Card_Number, Ex_Rights_Date_Code) AS GD,

dbo.f_getmiscdescription('GT', c.Card_Number, Rights_To) AS GT,

Basis_Amount_2_3 AS H1,

Basis_CUSIP_2_3 AS H2,

Basis_Surrender_3 AS H3,

Basis_Receive_3_1 AS H4,

Basis_Amount_3_1 AS H5,

Basis_CUSIP_3_1 AS H6,

Basis_Receive_3_2 AS H7,

Basis_Amount_3_2 AS H8,

Basis_CUSIP_3_2 AS H9,

Information_Agent_1 AS I1,

Information_Agent_2 AS I2,

Interest_Rate AS [IN],

dbo.f_getmiscdescription('J1', c.Card_Number, Subscription_Ratio_Code_1) AS J1,

dbo.f_getmiscdescription('J2', c.Card_Number, Subscription_Ratio_Code_2) AS J2,

dbo.f_getmiscdescription('J3', c.Card_Number, Subscription_Ratio_Code_3) AS J3,

Basis_CUSIP_4_2 AS K1,

Basis_Receive_4_3 AS K2,

Basis_Amount_4_3 AS K3,

Basis_CUSIP_4_3 AS K4,

Basis_Receive_3_3 AS L1,

Basis_Amount_3_3 AS L2,

Basis_CUSIP_3_3 AS L3,

Basis_Surrender_4 AS L4,

Basis_Receive_4_1 AS L5,

Basis_Amount_4_1 AS L6,

Basis_CUSIP_4_1 AS L7,

Basis_Receive_4_2 AS L8,

Basis_Amount_4_2 AS L9,

dbo.f_formatpseudodate(Withdrawal_After) AS LA,

dbo.f_getmiscdescription('LC', c.Card_Number, Withdrawal_After_Code) AS LC,

dbo.f_getmiscdescription('LG', c.Card_Number, Eligibility) AS LG,

Withdrawal_After_Time AS LT,

dbo.f_getmiscdescription('LZ', c.Card_Number, Withdrawal_After_Zone) AS LZ,

Option_Expiration_Time AS M1,

Rights_Expire_Time AS M3,

Expiration_Date_Time AS M4,

dbo.f_formatpseudodate(Maturity_Date) AS MD,

Maximum_Eligibility AS ME,

dbo.f_validatecardnumber(Refer_Card_1) AS N1,

dbo.f_validatecardnumber(Refer_Card_2) AS N2,

dbo.f_validatecardnumber(Refer_Card_3) AS N3,

dbo.f_getmiscdescription('NT', c.Card_Number, Interest_Rate_Code) AS NT,

DTC_Match_Card_Number AS O3,

Offer_By AS OB,

Odd_Lot AS OD,

dbo.f_getmiscdescription('OV', c.Card_Number, OverSubscription) AS OV,

dbo.f_formatpseudodate(Option_Expiration_Date) AS OX,

(SELECT Agent_Telephone FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 4) AS P1,

Information_Agent_Telephone_1 AS P2,

Information_Agent_Telephone_2 AS P3,

Dealer_Manager_Telephone_1 AS P4,

Dealer_Manager_Telephone_2 AS P5,

CUSIP_Number AS PN,

dbo.f_formatpseudodate(Pro_Ration_Date) AS PO,

dbo.f_getmiscdescription('PY', c.Card_Number, Payable_To) AS PY,

dbo.f_getmiscdescription('PZ', c.Card_Number, Protect_Period) AS PZ,

Price_1 AS R1,

Price_2 AS R2,

Price_3 AS R3,

Price_4 AS R4,

Price_5 AS R5,

Price_6 AS R6,

dbo.f_getmiscdescription('RB', c.Card_Number, Rights_Transferable) AS RB,

Rights_CUSIP AS RC,

Issuer_Description AS RD,

dbo.f_getmiscdescription('RI', c.Card_Number, Pro_Ration_Date_Code) AS RI,

Record_Type AS RT,

dbo.f_formatpseudodate(Rights_Expire_Date) AS RX,

CAST(Subscription_Ratio_1 AS varchar(12)) + Subscription_Ratio_1_Unit AS S1,

CAST(Subscription_Ratio_2 AS varchar(12)) + Subscription_Ratio_2_Unit AS S2,

CAST(Subscription_Ratio_3 AS varchar(12)) + Subscription_Ratio_3_Unit AS S3,

dbo.f_getmiscdescription('SC', c.Card_Number, Source_Name) AS SC,

Service_Type AS SE,

dbo.f_getmiscdescription('ST', c.Card_Number, Subscription_To) AS ST,

(SELECT Redemption_Agent_Telephone FROM Redemption_Agent ra WHERE ra.Card_Number = c.Card_Number AND Redemption_Agent_Number = 1) AS T2,

(SELECT Redemption_Agent_Telephone FROM Redemption_Agent ra WHERE ra.Card_Number = c.Card_Number AND Redemption_Agent_Number = 2) AS T3,

(SELECT Redemption_Agent_Telephone FROM Redemption_Agent ra WHERE ra.Card_Number = c.Card_Number AND Redemption_Agent_Number = 3) AS T4,

(SELECT Redemption_Agent_Telephone FROM Redemption_Agent ra WHERE ra.Card_Number = c.Card_Number AND Redemption_Agent_Number = 4) AS T5,

(SELECT Agent_Telephone FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 1) AS T7,

(SELECT Agent_Telephone FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 2) AS T8,

(SELECT Agent_Telephone FROM Agent a WHERE a.Card_Number = c.Card_Number AND Agent_Number = 3) AS T9,

Tickler_Date AS TK,

dbo.f_getmiscdescription('TP', c.Card_Number, To_Purchase) AS TP,

dbo.f_getmiscdescription('TS', c.Card_Number, Transaction_Status) AS TS,

dbo.f_gettxtext(c.Card_Number) AS TX,

Basis_CUSIP_1_3 AS U1,

Basis_Surrender_2 AS U2,

Basis_Receive_2_1 AS U3,

Basis_Amount_2_1 AS U4,

Basis_CUSIP_2_1 AS U5,

Basis_Receive_2_2 AS U6,

Basis_Amount_2_2 AS U7,

Basis_CUSIP_2_2 AS U8,

Basis_Receive_2_3 AS U9,

RTRIM(Issue_Description) AS UD,

Voluntary_Mandatory AS VM,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 1) AS W1,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 2) AS W2,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 3) AS W3,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 4) AS W4,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 5) AS W5,

(SELECT New_Issue_CUSIP FROM New_Issue ni WHERE ni.Card_Number = c.Card_Number AND New_Issue_Number = 6) AS W6,

dbo.f_formatpseudodate(Withdrawal_Prior_To) AS WD,

Withdrawal_Prior_To_Time AS WH,

dbo.f_getmiscdescription('WO', c.Card_Number, Withdrawal_Prior_To_Code) AS WO,

dbo.f_getmiscdescription('WZ', c.Card_Number, Withdrawal_Prior_To_Zone) AS WZ,

(SELECT Payable_Rate_Amount FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =3) AS X1,

(SELECT Payable_Rate_CUSIP FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number = 3) AS X2,

dbo.f_formatpseudodate(Expiration_Date) AS XD,

dbo.f_formatpseudodate(Ex_Rights_Date) AS XR,

dbo.f_getmiscdescription('XT', c.Card_Number, Rights_Expire_Code) AS XT,

Payable_Rate_Shareblock AS Y1,

Payable_Rate_Surrender AS Y2,

(SELECT Payable_Rate_Receive FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =1) AS Y3,

(SELECT Payable_Rate_Amount FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =1) AS Y4,

(SELECT Payable_Rate_CUSIP FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =1) AS Y5,

(SELECT Payable_Rate_Receive FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =2) AS Y6,

(SELECT Payable_Rate_Amount FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =2) AS Y7,

(SELECT Payable_Rate_CUSIP FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =2) AS Y8,

(SELECT Payable_Rate_Receive FROM Payable_Rate pr WHERE pr.Card_Number = c.Card_Number AND Payable_Rate_Number =3) AS Y9,

dbo.f_formatpseudodate(Payment_Date) AS YD,

dbo.f_getmiscdescription('YR', c.Card_Number, Payable_Rate) AS YR,

dbo.f_getmiscdescription('Z1', c.Card_Number, Option_Expiration_Zone) AS Z1,

Rights_Expire_Zone AS Z3,

Expiration_Date_Zone AS Z4

FROM COMMON c

INNER JOIN DC_DailyCard dc ON c.Card_Number = dc.Card_Number

WHERE c.Card_Status = 'R' AND c.Card_Date BETWEEN @start_date AND @end_date

END

View 2 Replies View Related

SQL Query Blank Space

Oct 11, 2000

Hi:
I did the following query on SQL Server A and got the following result.
Input: select replace('10/10/00', '/', '')
Result: 101000
(1 row(s) affected)
However, I did the same query on SQL B and got a different result.
Input: select replace('10/10/00', '/', '')
Output: 10 10 00
(1 row(s) affected)

Both Servers are SQL 7.0 with SP2. I checked the setting, it seems to be identical. Does anyone know what could be the problem or have any hint what I need to check?
I beleieve the correct result should be the first result.

Thanks for any help.

View 3 Replies View Related

Query With A Table Name That Has A Space...

Jul 23, 2005

I have a table name in SQL Server 2000 that has a space in itex: aim internationalI had trouble just in the query analyzer with this..I had to place thename in brackets [] for it to work. But now I'm in Visual Studio .Net2003 and it gives me another problem. I get the table name from a dropdown list selection and send it to a query string. But is gives me thiserror:***************Line 1: Incorrect syntax near 'AIM international'.Exception Details: System.Data.SqlClient.SqlException: Line 1:Incorrect syntax near 'AIM international'.******************Here is the string:****************Dim sqlStr As String = "SELECT DISTINCT Last_Name FROM '" & PubName &"' WHERE PostalCode ='" & postalcode & "' And Title='" & title & "'ORDER BY Last_Name "**********************And the variable PubName is the string AIM international .I tried placing it in brackets like in the query analyzer :****************Dim sqlStr As String = "SELECT DISTINCT Last_Name FROM ['" & PubName &"'] WHERE PostalCode ='" & postalcode & "' And Title='" & title & "'ORDER BY Last_Name "*******************and I get this:*******************Invalid object name ''AIIM international''.Exception Details: System.Data.SqlClient.SqlException: Invalid objectname ''AIIM international''.*******************Any idea what I have to do for it to work ??? Can I use table nameswith spaces or it's just not a good idea???Thanks for the help guys!!JMT

View 6 Replies View Related

The Merge Process Failed To Execute A Query Because The Query Timed Out

Dec 22, 2006

Hi there. I have occasional sincronization error.-XSUBSYSTEM Merge
-XSERVER MYSERVER
-XCMDLINE 0
-XCancelEventHandle 000006E0
2006-12-22 14:55:00.833 Connecting to Subscriber 'Subscriber01'
2006-12-22 14:55:00.895 Connecting to Distributor 'Publisher01'
2006-12-22 14:55:02.974 Initializing
2006-12-22 14:55:03.083 Connecting to Publisher 'Publisher01'
2006-12-22 14:55:06.005 Retrieving publication information
2006-12-22 14:55:06.130 Retrieving subscription information.
2006-12-22 15:00:07.222 The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
2006-12-22 15:00:07.456 Error converting data type nvarchar to numeric.
2006-12-22 15:00:07.800 Category:SQLSERVER
Source: Subscriber01
Number: 8114
Message: Error converting data type nvarchar to numeric.

After manual syncronization it goes under control.

Could anybody explain the relationship between converting error and timed out query?

If this is poor connection's problem how can I increase the query timeout for the process?

View 5 Replies View Related

Can I Find The Drive Space Using A SQL Query?

Jun 1, 2001

Hey - I know that I can find space information about SQL Server. Allocated space, free space, used space, data space, etc... BUT is there a way that I can query how much total/available space is on the actual drive? For example, let's say that I have SQL installed on the D drive of a Server; i also have another application on that drive. I know that I can query how much room SQL Server is using, but can i query how much total/available space is on the drive? Any help appreciated.

View 1 Replies View Related

Query Optimisor Out Of Stack Space

Oct 4, 2006

Hi,

I have recently upgraded to SQL Server 2005 (SP1) Developer Edition from SQL Server 2000 (SP4). Since doing so, i have been unable to delete any records from a specific table.

I have found this is due to having approximately 340 foreign key constraints referencing the UserID column of the table.

This functionality worked in SQL Server 2000. Do Microsoft plan to release any fixes for this issue?

Kind Regards,
Martyn...

View 4 Replies View Related

How To Find Free Disk Space Available From SQL Query

Jul 14, 2004

Hi all,
I have to find free disc space in a drive from SQL Query and i am using MSSQL200. Does any body know the command for the same.

Also if i want to find hard disk space of a different machine on network, it is possible to get the data??

Also can i get the CPU/Memory usage data of our machine by some SQL/C++ commands??

Please let me know if u know any of the answer...

thanks
Alok

View 1 Replies View Related

Know The Hard Disk's SQL Server Space Available From SQL Query

Oct 5, 2007



I would be able to determine how much hard disk space is available on the Server with a SQL Query, and from an other computer on the LAN.

How can I do something?

Thanks for your help.

View 4 Replies View Related

How To Replace Empty Space Or White Space In A String In A Stored Procedure

Nov 14, 2007

Hi,
 I am trying to do this:
UPDATE Users SET  uniqueurl = replaceAllEmptySpacesInUniqueURL('uniqueurl')
What would be the syntax.
Any help appreciated.
Thanks
 

View 1 Replies View Related

Mutilple Space Gets Converted To Single Space In Report Viewer Control

Feb 23, 2007

I am generating a Report from Sql Data Source in Sql Server 2005 and viewing the Report in Report viewer control of Visual Studio 2005.
The data in the Data Source contains string with multiple spaces (for example €œ Test String €œ) but when they get rendered in Report viewer control, multiple spaces gets converted to single space €? Test String €œ.

I tried following solutions
1) Replacing spaces with €œ €?
2) Inserting <pre> tag before the string and </pre> tag after the string (Also tried &lt;Pre&gt; instead of <pre>)

But in all the cases result is same. The Report Viewer control is showing €œ&nbsp€? instead of space and €œ<Pre>€? tag instead of preserving spaces.

Please provide me a solution so that spaces can be preserved in Report Viewer.

View 1 Replies View Related

Can I Find The Space Allocated For A Database W/ Query Analyzer Using 7.0?

May 15, 2001

My group is trying to ensure that there is a sufficient amount of cushion between the space allocated and the current size of a database. I know that I can check this using the Enterprise Manager. Is there a stored procedure or a systems table that holds this information. I know that sp_spaceused will give me the unallocated space, but i want the allocated space. Any suggestions?

View 2 Replies View Related

Transact SQL :: How To Find Space Available Or Send Space Alerts In Percentage

Nov 26, 2015

I am using the below script to get space alerts  and now i am interested in sending alerts  if for any drive space available is Less than 10% or 15%.. how to convert beelow code to find in % 

Declare @Drives Varchar(20)
DECLARE @Spaces Varchar(50)
DECLARE @availableSpace FLOAT
DECLARE @alertMessage Varchar(4000)
DECLARE @RecipientsList  VARCHAR(4000);
CREATE TABLE #tbldiskSpace

[Code] ....

View 3 Replies View Related

Trans Log-&>space Allocated 27GB, Space Used 100MB

Mar 2, 2005

Hi.. I was doing a good maintenance on my DB and my trans log LDF keep growing until 30GB but my DB data file MDF is only 2GB. I found the two following method to reduce my log size.

Method 1: I used veritas to backup log file with truncate
Method 2: I used the shrink database option in Enterprises manager to shrink it (file chosen=log , use default option)

After doing that, I found my LDF log file is still about the same size=27GB but when I see clearly, from the shrink database windows, the log spaced used reduced to only 100MB, the allocation log space is still 27GB. Why? How to make the LDF smaller to be the around the same size as the space used 100MB?

View 1 Replies View Related

Double Space Replaced With Single Space By Dbms ??!

Jul 20, 2005

This is driving me bananas. Can't find any info on this anywhere....SQL 2000 seems to replace double space with a single space when I seta varchar field to " " (2spaces), it only stores " " (1space). Whyon earth would microsoft do this? If I save 2 spaces - I WANT TO SEE2 SPACES!!!!Can anyone help? Is this a database setting? Is this due to usingvarchar?Any help appreciated.Colin Hale

View 2 Replies View Related

Transact SQL :: Query To Return Free Space From Mounted Drive

Nov 25, 2015

Is it possible to find out available free space from a mounted / network drive using tsql query? I am using sql server 2008 R2.

View 5 Replies View Related

Problem With Space Allocated For Transaction Log Space

Dec 5, 2001

Hello,

Somebody know how to reduce the space allocated for the transaction log space for my SQL_DB ?

3700 MB allocated but only 100 MB used and 3600 MB are free !

Transaction log properties :
Automatically grow file are filled
file growth by percent = 5%
maximum file size - restrict filegrowth = 3700 MB (we can't reduce it !)

Thank you for your precious help !
Khaix from Brussel.

View 1 Replies View Related

Suppress Multiple Space To Single Space..

Nov 14, 2006

How do we suppress multiple spaces to a single space in T-SQL

E.G.

Field: FullName

e.g.

WOMENS HEALTH RIVER VALLEY
JOHN FAMILY MED GROUP
HERSH STWEART P.
PARK HEIGHTS MEDICAL CENTER
KOPP WHITEFIELD E

The o/p wanted is

HERSH STWEART P.



Thank you.


View 3 Replies View Related

Log The Query Of The Execute Query Task

Mar 23, 2007

Hi,

I want to log/watch the query executed by the "Execute query Task". It's a query with different variables, the different variables i can see in one of the debug windows and these looks OK, but the query doesn't do what's expected. So i want to see the whole query, is that possible?

Query logging on the database server isn't an option. The server is an oracle server and the dba doesn't want to change this setting.

Thanks,

Dennis

















View 3 Replies View Related

MDX Query Builder - Query Does Not Execute

Jan 3, 2008

NOTE: I am using Brian Larsons book Delivering Business Intelligence with SQL Server 2005. I am stuck on page 588 - step 20. I am using Windows Vista Ultimate

Once all the Dimensions & attributes I have selected are dragged into the query area in MDX query builder no data is displayed. There is a message: "No rows found. Click to execute the query." - clicking does nothing.

How can I resolve this problem ???

View 2 Replies View Related

I Need Some Help.... I Cannot Execute Any Query Fr

Jul 27, 2007

Hi all,

I need some help.... I cannot execute any query from sql 2005, when I try to execute a query it stays executing and I never receive any result set. I uninstalled and re installed again SQL 2005 in my computer and also I installed the Service Pack and I am still getting the same. Could you please help me or advice on this situation?

Thanks in advance,

Mauricio.

View 10 Replies View Related

Execute Query For Each Row

May 3, 2007

I want to execute a query for each row in a report since a parameter in that query relies on a field in the row. Is there a way to do this?

View 1 Replies View Related

Time To Execute A Query?

Aug 1, 2003

Is there a way in sql server to find out how much time a sql server took to execute a query.

Thanx in advance.

Regards,

Samir

View 2 Replies View Related

How Can I Execute SQL Query From DOS With Parameters?

Feb 8, 2007

I believe all of us use SQL Server Management Studio to execute query. As I encountered serious problem with this method, due to typo error by accident, I am wondering if we can run the .sql file from dos and supply parameters with it.Possible?

View 4 Replies View Related

Execute A Query From A String

Jan 27, 2004

I've got a string that contains my Insert query

How can I execute it ?


declare @sql char(500)
Select @sql = '"Insert Into T74ACCO Select * From tempdb..##Temp tp Where tp.' + @Key + ' not In (Select ' + @Key + ' From T74ACCO)"'


Thank you in advance
BK,BM or Snail

View 14 Replies View Related

Execute Query With Buffer.

Feb 15, 2007

Ramesh writes "Hi,

Is there any possibility to execute a query in sql server 2000 without keep / using buffer.

Thanks"

View 1 Replies View Related

SQL Server - How To Execute New Query

Sep 5, 2006

I create some tables and I can't execute new query, I used to be able to do it, but I can't do it now. I'd like to find out that how can I do it again.

Thanks

View 3 Replies View Related

Trying To Execute An Update Query From A Button

Jun 16, 2006

I've got a sqldatasource with a update query in it.  Now I'm trying to execute that query on button click.  How do I go about doing so?
 
Here's my ASPX code:
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Data_Verification_Editor.aspx.vb" Inherits="Core_Data_Verification_Editor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Data Verification Editor</title>
</head>
<body>
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDS_Valid" runat="server"
ConnectionString="<%$ ConnectionStrings:Test%>"
SelectCommand="Data_Validation_sp" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<asp:SqlDataSource ID="Test" runat="server"
ConnectionString="<%$ ConnectionStrings:Test%>"
UpdateCommand="UPDATE [Data_Valid_Current_tbl] SET ID = '@selected_id', SET Title = '@selected_text' WHERE PrimID = '1'">
<UpdateParameters>
<asp:ControlParameter Name="selected_id" ControlID="Data_Ver_ddl" PropertyName="SelectedValue" />
<asp:ControlParameter Name="selected_text" ControlID="Data_Ver_ddl" PropertyName="SelectedText" />
</UpdateParameters>
</asp:SqlDataSource>
<table style="width: 320px; background-color: menu; border-right: menu thin ridge; border-top: menu thin ridge; border-left: menu thin ridge; border-bottom: menu thin ridge; left: 3px; position: absolute; top: 3px;">
<tr>
<td colspan="2" style="font-family: Tahoma; font-size: 10pt;">
Testing:<br />
</td>
</tr>
<tr>
<td colspan="2">
<asp:DropDownList ID="Data_Ver_ddl" runat="server" DataSourceID="SqlDS_Valid" DataTextField="Title"
DataValueField="ID" style="width: 100%; height: 24px; background: gold">
</asp:DropDownList>
</td>
</tr>
<tr>
<td style="width:50%">
<asp:Button ID="Submit_btn" runat="server" Text="Submit" Font-Bold="True"
Font-Size="8pt" Width="100%" />
</td>
<td style="width:50%">
<asp:Button ID="Done_btn" runat="server" Text="Done" Font-Bold="True"
Font-Size="8pt" Width="100%" />
</td>
</tr>
</table>
</form>
</body>
</html>
 

View 1 Replies View Related

Query Analyser Execute Sequence

Jan 4, 2001

Howdy

If I have serveral queries as shown below:
================================================== ==========
USE XXX
SELECT XX_ZZZZZ, XX_YYY, XX_XXX
FROM ZZZ_ZZZZ_ZZZZ
WHERE QQQQQQQQQQQQQ ='PGL'

USE XXX
SELECT AAA_AAAAA_AAAA,AA_BBB, CC_DDD
FROM SSSS_SSSSS_SSSSS
WHERE FFF_FFFF ='A'
================================================== ===========
Can anyone tell me if the queries execute concurrently or
is it one after the other?

Many thanks,

W.

View 1 Replies View Related

Execute A Query Without Fireing Triggers - How?

Jun 17, 2006

Hello,

I would like to execute a sql-query on a table, but disable the triggers that whould fire on the change.

Thank you for telling me how to do this!

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !

View 2 Replies View Related

Execute Query Within Custom Code

Apr 2, 2008

Hi,
Is it possible to connect to a database and fetch data from it from within custom code inside a report?
Appreciate any help.

Regards,
Asim.

View 4 Replies View Related

SP2 Issue With Execute SQL Parametrized Query

Feb 21, 2007

Hello,

I try SP2 and cannot get the Execute SQL task to work as before.

In this example I use an OLEDB Microsoft Oracle provider.

The script uses a parameter like that

 select Cast( decode((
select
DECODE(TRUNC(c.END_DATE), TRUNC(SYSDATE),1,NULL) AS RESULT
from one_stage.load_complete c
where TRUNC(c.end_date) = TRUNC(sysdate)
and c.name = ?
and c.STATUS = 'SUCCEEDED')
,Null,0,1)  as varchar(2)) AS Result from Dual

The script task is set to BypassPrepare = False

I note only one change, the addition of a parameter setting called Parameter Size set by default to -1

I tried different things like reading the new BOL, changing the Bypass prepare, Changing the Parameter Size and changing the ? , nothing works. the output variable is always set to a value of 0 which is the result of the query test if there is no match.

It looks like the input variable is no longer passed to the query parameter.

What should I do to get this to work with SP2?

Thanks

Philippe

View 14 Replies View Related







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