SSIS Script Not Working
Apr 23, 2007
I am using the script below to update a DB2 table and it successfully executes. However, the database doesn't update. Can anyone help me?
Public Class ScriptMain
Inherits UserComponent
Dim connMgr As IDTSConnectionManager90
Dim conn As OdbcConnection
Dim cmdSelect As OdbcCommand
Dim cmdUpdate As OdbcCommand
Dim cmdInsert As OdbcCommand
Dim paramInsert As OdbcParameter
Dim paramSelect As OdbcParameter
Dim paramUpdate As OdbcParameter
Dim ds As DataSet
Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
connMgr = Me.Connections.Connection
conn = CType(connMgr.AcquireConnection(Nothing), OdbcConnection)
End Sub
Public Overrides Sub PreExecute()
cmdUpdate = New OdbcCommand("UPDATE WEBLIB.A2JBMSKHF SET A2DESC = @FullName WHERE Rtrim(A2JOBN) = @FileNameNum", conn)
paramUpdate = New OdbcParameter("@FullName", OdbcType.VarChar)
cmdUpdate.Parameters.Add(paramUpdate)
paramUpdate = New OdbcParameter("@FileNameNum", OdbcType.VarChar)
cmdUpdate.Parameters.Add(paramUpdate)
End Sub
Public Overrides Sub BorrowerRecords_ProcessInputRow(ByVal Row As BorrowerRecordsBuffer)
Try
With cmdUpdate
.Parameters("@FileNameNum").Value = Row.FileNameNum.Trim.ToString()
.Parameters("@FullName").Value = Row.FullName.Trim.ToString()
.ExecuteNonQuery()
End With
Catch ex As Exception
ex.ToString()
End Try
End Sub
Public Overrides Sub ReleaseConnections()
connMgr.ReleaseConnection(conn)
End Sub
End Class
View 1 Replies
ADVERTISEMENT
Apr 1, 2008
Is the intent of Microsoft to enforce a vertical presentation of the SSIS Control Flow, Data Flow etc? I like to work down and to the right and I am having problems with the connectors (precedent) or in DTS 2000 world Success or On Success implied. Is there away to connect from the lower center anchor point to the side of the next object in the flow? For some reason, I can't get a similiar look to DTS 2000 environment (going from the bottom middle of the object to the side anchor pint (small box) symbol to the left. It wants to anchor on the bottom right, left, or middle, if going horizontally. I must be missing something, here??
Thanks again!
Skyseek
View 2 Replies
View Related
Jun 11, 2007
Hi All,
I want to use an excel sheet as a source and pick up the data starting from 4th row.
can anybody suggest me a solution for this.
Cheers,
Prash
View 12 Replies
View Related
Nov 23, 2007
Hi All,
This may be a question for multiple forums but here it goes.
I have a large SSIS package that works great in Visula Studio (BIDS) and in SQL Server under MSDB folder. The properties are all set to save with a sql server authentication package password and that works great too. The problem occurs when I try to use this package in a schedule. I get an error about an OLB DB not working. I've tried many things and figured out that all the OLB DBs do not work in this package but only error as a STEP in a schedule.
They all reference a Client Access ODBC connection - which is a connection to an AS400 IBM machine. The actual error is pasted below, where I guess the root of the problem is a incorrect password. The password is fine and I have proven that by running the package successfully under the MSDB folder of Stored Packages under Integration Service.
Message
Executed as user: CNBSQL2SYSTEM. ...ion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 3:29:35 PM Error: 2007-11-22 15:29:38.13 Code: 0xC0202009 Source: HTEIMPORT2 Connection manager "Client Access ODBC Driver (32-bit) 7" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC Drivers" Hresult: 0x80040E4D Description: "[IBM][Client Access Express ODBC Driver (32-bit)]Communication link failure. comm rc=8002 - CWBSY0002 - Password for user COGNOS on system 172.16.1.2 is not correct". End Error Error: 2007-11-22 15:29:38.13 Code: 0xC020801C Source: Airport PR010ap v2 OLE DB Source 25 [60] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Client Access ODBC Driver (32-... The package execution fa... The step failed.
Please provide any insight if you can - I am still new at SQL2005.
Regards,
Tim
View 5 Replies
View Related
Jun 14, 2007
This is less of a specific question and more of a request for for some advice as to possibilities and directions. Here's the current situation. My company is using SAP for its purchasing, inventory, etc. This system is pretty much opaque to me - it's managed by another group within the company, and changes to it go through a complicated approval process. At the same time, the majority of our users, internal and external, are looking at this same data through a more accesible and more user friendly collection of web applications - done in classic ASP, up through ASP.NET 1.1 and 2 - and stored in an assortment of MS-SQL 2000 databases. Data is exchanged between SQL and SAP via DTS packages, some nightly, some run more frequently.
There's some issues here - data is never quite synchronized between the two sides, sometimes the same data must be updated twice, leading to possible data integrity issues, etc. Given that, we're going to be moving to SQL 2005 within the next year or so. From everything I've understood, within that context, there are vastly better ways of dealing with out situation than the way we're currently doing it.
So what I'm looking for is just a general impression of what can be done, with SSIS and SAP. Any approaches that might prove more fruitful, an y pitfalls to watch out for, that sort of thing.
View 3 Replies
View Related
Mar 19, 2007
I have a package that uses configurations to override package settings based on what environment the package runs in. The package's configuration entries begins with an initial XML config entry that overrides the package's connection manager to a SQL database that holds the remaining configs in a table. Subsequent config entries then fetch their settings from the table. This package is run from a SQL job.
This all works fine in dev. When I moved everything into prod the packages are not getting configured and are using their values stored in the DTSX files. I've triple checked the XML config file, the tables with the configs, and the packages. There are no error messages. I've added some debuging steps to the package to verify that the configs in the table are not getting into the package.
I've also tried manually changing the configs in the table where the package is set to look if the initial XML config fails to adjust the config database location. The package still fails to see any configs from the table.
What could be different between dev and prod that would produce this situation? Both dev and prod have identical copies of the package and the job and are currently pointed to the same configurations database.
By the way, the other connections in the package work for both source selects and destination inserts. Only the configurations are failing, and again there is no error message.
View 6 Replies
View Related
Aug 8, 2006
hi!
I am using a simple Data Flow within a Squence Controller and have added a Event Handler for OnPostExecute which contains a simple insert to a table, but this is not working. My package gets successfully execute but data is not getting inserted in the table used in Event Handler. I have also tried OnError, OnPackageFailer etc... but no results. Please guide.
View 18 Replies
View Related
Jan 11, 2008
Hi
I'm still fairly new to some of SSIS's enhanced funtionalities, one of them being Event handlers. I have tried creating a simple package, that simply contains a SQL Execute task that basically creates a simple table. Now i have then added a OnPostExecute even handler as a test which basically runs a script task that simply shows a msgbox. I have gone to execute the package, however after the completion of the SQL Execute task, nothing happens, the even handler doesnt get fired for some reason, i switch to the even handler page and the script task has not been executed. It is like this for every event handler i have tried, even the OnError event. Could this be a problem with my installation of SSIS or have i done something wrong?
Any help would be greatly appreciated as i have done SSIS training and to create an event handler was never this hard!
Regards
Singstar
View 12 Replies
View Related
Dec 3, 2007
I've been building a prototype using Webservices (coded in .NET) and SSIS to move data from our order/fulfillment system to our accounting system. I have struggled a bit with SSIS's WebService Tasks; but, finally have a package that runs locally that calls a web service and loads the data into SQL Server. I tried to move this to our server, I modify the HTTPConnection Parameter to the Product WS URL and the web service task fails with an "Unable to Connect to Server" error.
So, I decided to try running the production WS in my local (development) SSIS. I change the HTTP Connection URL, save, rebuild and run. The job runs successfully - against my LOCAL Web Service. It did not recognize the change or is somehow cached.
How do I get it to run against my Production Web Service???
Thanks.
Jennifer
View 4 Replies
View Related
Jan 3, 2008
Hi,
In my script 'm using
Set oPkg = DTSGlobalVariables.Parent
Set oBeginStep = oPkg.Steps("DTSStep_DTSExecuteSQLTask_1")
I guess becoz of using DTSGlobalVariables.Parent in activex,the script is not working.
Can anyone please suggest a solution to run it in SSIS.
Thanks in Advance
View 3 Replies
View Related
Mar 15, 2006
I have a 64bit Ent Ed, Created a SSIS package, deployed it, its running when running from sql server but not running as a job
View 1 Replies
View Related
Apr 11, 2008
how to evaluate working day through script component in SSIS
I have a data source. I need to verify if the date belongs to working day, if it does belongs to holiday or weekend ,then I need to send that row to the out put table. I think the only way I can verify this working day issue through script component. Can any one give me some idea/thoughts?
You all have a wonderful weekend.
Thanks
View 17 Replies
View Related
Jan 3, 2008
I have few tables that I need to export to an MS Access database each day to send off to the customer. In these tables I have a few columns that I need to strip all the HTML out of before they are put into Access since Access does not display the formatting correctly. Some of the fields are varchar and some are text, but all of the fields that are varchar are over 255 in size, so this forces me to use Access' Memo type for both.
In SQL 2000 I used the ActiveX Script to modify these fields, stripping out the HTML, and it gave me no complaints. In SQL 2005, I am adding a Script Component into the Data Flow before the Destination and adding the script in there. So far so good. The problem arises when I try to retrieve and update the data in these fields because they are treated as BLOB data. I believe what I need to do is to retrieve the Byte array from the row using the GetBlobData(), then convert that to a string, strip out the HTML, convert back to a Byte array, then clear the original value using the ResetBlobData(), and then update the field using the AddBlobData. I think?
I am not even sure that my code below is converting the byte array into a string correctly. If I throw a Messagebox in there to see what it has for the string, it just gives me the first character in the field. But even ignoring that, the package will not execute and I am stumped.
The error I now get is:
Array cannot be null.
Parameter name: bytes
''-----------------------------------------------------
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim b As Byte()
If (Row.ProjectDescription.Length > 0) And (Not
(Row.ProjectDescription_IsNull)) Then
b = Row.ProjectDescription.GetBlobData(0,
CInt(Row.ProjectDescription.Length))
End If
Dim str As String
Dim enc As New System.Text.ASCIIEncoding()
str = enc.GetString(b)
str = RemoveHTML(str)
b = enc.GetBytes(str)
Row.ProjectDescription.ResetBlobData()
If b.Length > 0 Then
Row.ProjectDescription.AddBlobData(b)
End If
End Sub
''-----------------------------------------------------
View 4 Replies
View Related
Apr 9, 2008
Hey,
What I am trying to achieve currently with SSIS is to view the content in one folder for example 'New' and if there is files in this then move it to 'Archived'.
Any nice liinks or tutorial or general advice you guys could give me ?
View 13 Replies
View Related
Jan 11, 2007
Hi Guys,
I have a package that inserts data from a sql server table to an oracle table. I use a dataflow task to do the loading.
The weird thing is, if the package fails during execution, the transaction does not perform a rollback and the inserted data is committed.
The dataflow component has its TransactionOption set to Supported (this has always been the case for our sql to sql packages). However, now that I have a sql to oracle package, it won't work anymore.. also, setting the TransactionOption of the dataflow component to Required causes the whole package to fail.
Anyone have any thoughts on this?
Thanks,
Kervy
View 1 Replies
View Related
Apr 8, 2008
I have a blob which is essentially an email and I need to replace all carriage returns in the blob with a special character ("€°"). But it does not work. Please advice.
Dim intBlobLen As Integer = Convert.ToInt32(Row.body.Length)
Dim intFinish As Integer = intBlobLen - 1
Dim bytBlob(intFinish) As Byte
bytBlob = Row.body.GetBlobData(0, intFinish)
Dim strBlob As String = System.Text.Encoding.Unicode.GetString(bytBlob)
strBlob = Replace (strBlob,"/n","€°")
If strBlob.Length > 0 Then
Row.body.ResetBlobData()
Row.body.AddBlobData(System.Text.Encoding.Unicode.GetBytes(strBlob))
End If
Please help. Thanks in advance
View 11 Replies
View Related
Nov 6, 2007
Hi ,
Iam using 'Execute SQl task' which calls a stored procedure located in sql server database.The task's SQL source type is variable and the variable has the follwoing expression "EXEC PROC_SEL_MBO_REPORT "+@[User::V_SP_Job_Date]after evaluation it is like EXEC PROC_SEL_MBO_REPORT '01/NOV/2007'.It is working fine
Now the procedure is changed to Oracle.So I have changed it to "BEGIN PROC_SEL_MBO_REPORT " + "("+ @[User::V_SP_Job_Date]+")"+"; END"+";" after evaluation it is like BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;.It is sucessfully executing from the task but no data is loaded into the tables which are used by the procedure internally.
Executing 'execute BEGIN PROC_SEL_MBO_REPORT ('01/NOV/2007') END;' is perfectly alright from SQl developer or sql plus.
Please help me.. thanks in advance
Regards,
GK
View 5 Replies
View Related
Jun 17, 2015
I'm working on SSIS to load the data from flat file to sql server, I'm getting date in below format, but in sql server I have given data type datetime. how to convert below format to 16-01-15 12.05.19.1234 AM.
View 4 Replies
View Related
Jul 30, 2015
I'm currently loading a package that does a lookup on a column of data type nvarchar(4).The values itself are (A+, A, B+, B, C, D, /). The strange lookup behaviour is happening for each of the cases, so it's not related to a specific value. After trying to put the cache on NO CACHE, the lookup works perfectly. When using the default FULL CACHE the strange behaviour happens. Could it be related to the data type? I have not yet tried to use a CHAR instead of a NVARCHAR but it looks like people have similar issues using CHAR.
View 2 Replies
View Related
Mar 3, 2006
hi
I had a view in which I did something like this
isnull(fld,val) as 'alias'
when I assign a value to this in the client (vb 6.0) it works ok in sql2000 but fails in 2005.
When I change the query to fld as 'alias' then it works ok in sql 2005 .
why ?? I still have sql 2000 (8.0) compatability.
Also some queries which are pretty badly written run on sql 2000 but dont run at all in sql 2005 ???
any clues or answers ?? it is some configuration issue ?
Thanks in advance.
View 5 Replies
View Related
Jan 7, 2004
I am writing a pgm that attaches to a SQL Server database. I have an Add stored procedure and an Update stored procedure. The two are almost identical, except for a couple parameters. However, the Add function works and the Update does not. Can anyone see why? I can't seem to find what the problem is...
This was my test:
Dim cmd As New SqlCommand("pContact_Update", cn)
'Dim cmd As New SqlCommand("pContact_Add", cn)
Try
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@UserId", SqlDbType.VarChar).Value = UserId
cmd.Parameters.Add("@FirstName", SqlDbType.VarChar).Value = TextBox1.Text
[...etc more parameters...]
cmd.Parameters.Add("@Id", SqlDbType.VarChar).Value = ContactId
cn.Open()
cmd.ExecuteNonQuery()
Label1.Text = "done"
cn.Close()
Catch ex As Exception
Label1.Text = ex.Message
End Try
When I use the Add procedure, a record is added correctly and I receive the "done" message. When I use the Update procedure, the record is not updated, but I still receive the "done" message.
I have looked at the stored procedures and the syntax is correct according to SQL Server.
Please I would appreciate any advice...
View 2 Replies
View Related
Feb 23, 2008
Original suggestion for my problem was - Select * from TableA where ID not in ( Select ID from TableB)
When I run the query below using the IN operator I get 227 records returned but when I use NOT IN I get zero records when I expect well over 10,000. What am I missing?
using SQL 2000 server
SELECT LinksInfo.L_ID, LinksInfo.C_ID, Companies.C_CompanyName, Companies.C_Email, Companies.C_CompanyEmailFROM LinksInfo INNER JOIN Companies ON LinksInfo.C_ID = Companies.C_IDWHERE (LinksInfo.L_ID IN (SELECT ZL_ID FROM Location_Zip))
ZL_ID is not a primary key in Location_Zip
View 2 Replies
View Related
Mar 25, 2008
Hello again,
I think im missing something here, i just cant find out what it is.
I have a temp table:
CREATE TABLE #tempSearch(tempID BIGINT IDENTITY(1,1) PRIMARY KEY,username NVARCHAR(20) COLLATE Finnish_Swedish_CI_AS,lastlogin DATETIME,signupdate DATETIME)
Now i am trying to retrieve some data for each user that is inside this tempSearch list and have an id over xxx (xxx = the value of the parameter @first_id):
SELECT @sql = 'SELECT profile_publicinfo.username, profile_publicinfo.gender, profile_publicinfo.signupdate, profile_profilephoto.imageurl, profile_profilephoto.alttext, settings_username.color, profile_publicinfo.lastloginFROM #tempSearch INNER JOIN dbo.profile_publicinfo ON profile_publicinfo.username = #tempSearch.usernameINNER JOIN dbo.settings_privateinfo ON settings_privateinfo.username = profile_publicinfo.usernameFULL OUTER JOIN dbo.profile_coolfacts ON profile_coolfacts.username = profile_publicinfo.username FULL OUTER JOIN dbo.profile_profilephoto ON profile_profilephoto.username = profile_publicinfo.usernameFULL OUTER JOIN dbo.settings_username ON settings_username.username = profile_publicinfo.usernameWHERE (profile_publicinfo.username IN (SELECT username FROM #tempSearch))AND #tempSearch.tempID >= @first_id'
SELECT @paramlist = '@first_id int'EXEC sp_executesql @sql, @paramlist, @first_id
I need to get the tempID from the tempSearch table in order to compare it with @first_id
When i run this i get the same username repeated like 30 times then it moves over to the next, when i debug the #tempSearch it looks fine, just the users that are suppose to be there.
View 1 Replies
View Related
Jun 17, 2004
Hi
I think I have installed MSDE sucessfully. The new servie is running, but how can I test ifit is working? Can I place my files anywhere on the system?
All help appreciated
View 1 Replies
View Related
Apr 25, 2006
I am using the following C#...
SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class loader = new SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class();
loader.ConnectionString = "PROVIDER=SQLOLEDB; Server=(local); database=TestDB; user id=test; password=password";
loader.ErrorLogFile = "C:log.txt";
loader.SchemaGen = true;
loader.SGDropTables = true;
loader.CheckConstraints = true;
loader.Execute(
"C:xsd.xsd"/* this file below */,
"C:xml.xml"
);
To generate tables in the database using the following xml schema...
(file: xsd.xsd...)
My problems is that it doesn't generate the tables and I am following the SQLXML2.0 documentation as closely as possible.
Does anyone know what I have to do to get it to generate the tables? Running it doesn't even produce an error.
Cheers,
Matt.
View 1 Replies
View Related
May 3, 2002
OK so I'm using dynamic sql to enable me to have a variable for the order by, but now it's giving me the following error
Syntax error converting character string to smalldatetime data type.
Any help is very much appreciated
Code follows
CREATE PROCEDURE spBattingAve1
@cid datetime,
@cid1 datetime,
@sid nvarchar(10)
AS
DECLARE @query nvarchar(4000)
SET @query = 'SELECT MAX(t_batting.runs) AS BestRuns,
COUNT(t_batting.dnb) AS DidNotBat, t_player.surname, t_player.firstname,
t_batting.player_id,
Sum(t_batting.runs) as SumOfruns, COUNT (*) AS Games,
COUNT (t_batting.notout) as nout,
(Sum(runs)/(COUNT(*)-(COUNT(notout)+COUNT(dnb)))) as AverageRun,
(COUNT(*)-COUNT(dnb)) AS Innings,
(SELECT COUNT(*) FROM t_batting inner join t_game on t_batting.game_id = t_game.game_id WHERE (t_batting.player_id = t_player.player_id) AND runs >= 50 AND runs <100 and t_game.date >= '+@cid+' And t_game.date <= '+@cid1+' GROUP BY t_batting.player_id) AS Overfifty,
(SELECT COUNT(*) FROM t_batting inner join t_game on t_batting.game_id = t_game.game_id WHERE (t_batting.player_id = t_player.player_id) AND runs >= 100 and t_game.date >= '+@cid+' And t_game.date <= '+@cid1+' GROUP BY t_batting.player_id) AS Overton
FROM t_batting
INNER JOIN t_game ON t_batting.game_id = t_game.game_id
INNER JOIN t_player ON t_batting.player_id = t_player.player_id
WHERE t_batting.player_id = t_player.player_id
AND t_game.date >= '+@cid+' And t_game.date <= '+@cid1+'
GROUP BY t_batting.player_id, t_player.surname, t_player.firstname, t_player.player_id
HAVING (COUNT(*)-(COUNT(notout)+COUNT(dnb))) <> 0
order by '+@sid+'
DESC'
exec (@query)
View 1 Replies
View Related
Jun 21, 2001
In SQL 7.0, when i use the below query in query analyzer, I got an error message. why?
======================
Set Identity_insert on
UPDATE Table1
SET no = 3
WHERE no = 4
Set Identity_insert off
go
Error message
=============
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'on'.
Server: Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'off'.
View 2 Replies
View Related
May 1, 2006
Hi,
I am on a box with 4 GB of memory that only runs SQL Server. SQL Server is using 1.7 GB as per task manager. There are a lot of databases on this box. I looked at the boot.ini and /3GB was not set. I have done this at least 50 times before: turn on the /3GB switch and SQL Server will use up to 2.7 GB per task manager. (I know it is actually 2GB and 3GB but it seems that in task manager it shows up as 1.7-1.8 and 2.7-2.8)
Anyway back to the story. So I set /3GB, rebooted the server and SQL Server still only consumes up to 1.7GB. I realize that SQL Server might not actually need more memory, but I have a distinct feeling that it wants more but is being constrained; that is, the the /3GB switch is not working. More relevant information:
1) the boot.ini line:
multi(0)disk(0)rdisk(0)partition(1)WINNT="Microsoft Windows 2000 Advanced Server" /fastdetect /3GB
2) max server memory (MB) = 3000
3) min server memory (MB) = 3000
4) awe enabled = 0
5) @@version = 8.00.2039 which is SQL Server 2000 SP4
Has anyone seen this before? Any ideas on how to troubleshoot this?
View 1 Replies
View Related
Oct 16, 2006
Hi all:
Because me not this functioning the following one query.
simply me not the function respects min, because?, that I am doing badly?
Select Distinct(Min(c.gentime)),
a.CardNumber,a.CardHolderId,a.Deleted,
b.RecordId,b.FirstName,b.LastName,b.Deleted,b.Note 4,
c.param3,c.param2,c.param1,c.recvtime,c.gentime,c. link1,c.link2,c.link3,c.deleted,c.recordid,c.seqid
From Card a,
CardHolder b,
History c
Where ((a.cardholderid = b.recordid)And(b.recordid=c.link3))
And(a.Deleted = 0)And (b.Deleted = 0)And(c.deleted = 0)
And(a.cardnumber Between 1500 And 1600)
And(b.note4 <> 'Mantenimiento')
And(c.RecvTime >= CONVERT(DATETIME, '2006-10-01 00:00:00', 102))And(c.RecvTime <= CONVERT(DATETIME, '2006-10-12 23:59:59', 102))
And(c.Link1=10)
Group By a.CardNumber, a.CardHolderID, a.Deleted,
b.RecordID, b.Deleted, b.FirstName, b.LastName, b.Note4,
c.Deleted, c.RecvTime, c.GenTime, c.Param1, c.Param2, c.Param3, c.Link1, c.Link2, c.Link3, c.Link4,c.recordid,c.seqid
Order By a.CardNumber,c.recvtime
Thanks.:confused:
View 6 Replies
View Related
Mar 2, 2006
hi..why this SP is not working that giving me error like
Server: Msg 2714, Level 16, State 1, Procedure test_E, Line 12
There is already an object named '#emp' in the database.
my one of the developer used this every where... what should i do if i dont wanna to change any of the code...i wanna some how work this SP...
create proc test_E
as
select * into #emp
from (select * from emp) p
select * from #emp
drop table #emp
select * into #emp
from (select * from dept) p
select * from #emp
drop table #emp
T.I.A
Papillon
View 5 Replies
View Related
Apr 11, 2006
select replace(local_notes,char(13),' ') from locals
Not Working ......
View 12 Replies
View Related
Sep 20, 2006
declare @table table(ad_num varchar(20), ad_str1 varchar(20))
insert @table
select '20', '20 apple avenue' union all
select '20', 'apple avenue'
select * from @table
if (select * from @table where substring(ad_str1, 1, 1) like '[0-9]'))
print 'address starts with a number'
else
print 'address starts with a letter'
i want to write a code that prints a msg if the string starts with a number else print another msg.
View 20 Replies
View Related
Sep 26, 2007
In SQL2000 Enterprise manager, there is always an indication of WHICH server & database an object is opened from when it has focus.
So when I'm working on the same table in test and production servers I can tell at a glance what it belongs to.
I cannot seem to duplicate this in any way in SQL Manager 2005 Express which could lead to all sorts of trouble and really slows me down.
Have I missed something really simple in setup or use of the product?
TIA,
Richard
View 2 Replies
View Related