My table has the field (PID varchar 17) either 13 or 17 character records. I would like to use the logic below to construct a new table with two fields (CODE varchar 13) and (CODEKEY varchar 17)
IF len(PID) = 13 Then insert into iTable
ESLE
IF len(PID) = 17 Then
1. insert the first 9 characters...
I'm currently using OPENQUERY to move data form AS400 to SQL. INSERT is what I use and it is working just fine. However I'm just curious on how UPDATE query syntax is written for similar puropse. Any headsup is appreciated. Thanks
Hi all,
From SQL Server I linked to an iSeries AS400 and everything works just fine. I can query the AS400 file/table with the following count statement:
select * from openquery(MYLINKEDSERVER, 'select count(*) from myFile/myLib')
I would like to use an IF statement first to check whether the...
I'm geting the error message "Error 21776 [SQL-DMO]the name 'mytable' was not found in the Tables collection". I was trying to create a non clustered index on 'mytable' using the Wizard from Enterprise Manager.
This is happening to all the talbes in that database. How can I correct...
Hello all,
I have a decimal data type in my table that holds financial data. I setup the scale to 2, so it holds the decimal places. SQL for some reason kept rounding up. How do I display the data as is. Example, 125.89 display as 126.00
Should I use 'money' data type rather than the decimal...
Hi everyone,
I'm trying to setup transactional replication. During the process of setting up the Distributor I'm getting the following message:
"The snapshot folder path, "\\\MyServer\D$\MSSQL\...", uses a special share name which can usually be accessed only by a login with...
Hell everyone,
I currently have our AS400 linked to SQL Server and we are doing a nightly upload from AS40 to SQL. This process is working great and our intranet site is flying.
We need to upload some what same data into our internet hosting company's SQL server.
I'm just looking for ideas...
Hello all,
I found this forum to be very helpfull, so I'm back with more questions. I'm querying AS400 machine by linking it to SQL Server just fine.
I would like however, rather than getting the data display in the results pane of Query Analyzer I would like to automatically insert the data...
Guys,
I'm dooing an openquery after successfully creating a linked server using iSeries ODBC driver as follows:
Select * from OpenQuery(MyServer, ' ')
I need some one to help me rewrite the following query in the above OpenQuery statement. Here is my AS400 query which by the works just...
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.