I can see that your dates are dd/mm/yy format, that changes some things. To simulate your problem, try the following query, it should throw the same error you've been experiencing.
declare @sourcedate varchar(17)
select @sourcedate = '21/01/03 12:03:32'
select convert(datetime,@sourcedate) as...
This couldn't be easier. right click on the pageframe and choose EDIT. You should now see a light blue marquee around the whole pageframe to indicate that you are in Page edit mode. While in the Page edit mode, left click on the page you want to move (eg. Page 2), now right click the page and...
You may still be able to perform what you need in a query if you don't need to do fetch looping. Can you pull some actual data from your table, show some rows in a reply, followed by what the desired output is and I'm sure there is a simple solution. SQL does recursion very well.
bj,
Can you select some rows showing the varchar dates you speak of in SQL Query Analyzer? Then cut & paste some in a reply to this message and I've no doubt we can get you moving forward.
If you set up SQL to automatically backup your database on a schedule using SQL Agent, it will force a date increment in the backup file name. So the Northwind database would have backups named:
Northwind_030519200.bck
Northwind_030518200.bck
Northwind_030517200.bck
Northwind_030516200.bck
You...
The following will show you the day of week for the current date:
select datepart(dw,getdate()) as dayofweek
Depending on what your SET DATEFIRST setting is, and assuming Monday has a dw value of 2, your query could simply look like this:
select * from Table
where...
Chip,
If you have some more time ;-) do you think you could give that complete answer? The documentation for "reflection" and "callbyname" read like instructions to make plutonium.
Thanks,
Bobalooey
If your entereddate field is datetime, why bother converting to varchar(10). That will just slow it down. Your logic is sound, just try:
SELECT * from claim
where dateadd(yyyy,-2,getdate()) > entereddate
order by entereddate
Now the question is what are you going to do with the data that you...
Can you elaborate a little? What do you mean by "if something goes wrong"? If you want to make sure everything worked so that you are sure not to end up with a "bad" name, simply put the update into a transaction like:
BEGIN TRANSACTION
--Perform your update and check...
How do you want the data to display? In a tree view or hierarchical data grid, or what? Like the following I assume.
Bill Gates
Steve Balmer
Steve Jobs
Ken Levy
Yedudi Menuhin
The only way to get every "node" to walk back up through the tree...
Ok talenx, ready for this?
The only way I've ever been able to get this to work is to create a cursor from the unique values (minus the key and line number in your case), then sequentially fetch those cursor rows into memory variables and then select the "top 1 *" from my main table...
Assuming you want to show the parent for every child in your hierarchy, let's say your file looks like the following Employee table:
id int
parent_id int
employee char(50)
with data that looks like:
id parent_id employee
------------ -------------...
1.) Turn off the "Save Data with Report" switch. This will make sure your users don't get the same snapshot you made when you saved the report for the first time. This is a neat feature, but extremely annoying if not utilized properly and I believe its turned on by default.
2.) Not...
I believe that instead of trying to define a T-SQL variable (@loop) as a table, you want to try "Create Table" instead. Use #Loop as your table name if you want to consider it as a temporary table. The table #Loop will be automatically dropped once your SQL Connection is dropped.
[b]...
Try this experiment, view some of the offending data under SQL Enterprise Manager. I'll bet you see the amounts with the trailing zeroes missing. Now query the same table from the SQL Query Analyzer and I'll bet you the numbers are now padded to the right to fill up the decimal positions. How...
You say both databases are running on the same server, but are they both running under the same SQL instance? If not, you may have network protocol variances. One that has plagued me would be that the fast instance was running under TCP/IP and the slow performer was running under Named Pipes...
While you have your report open for editing, click on File, Printer Setup and define your paper settings right there and save the report. It will retain those settings.
Anna,
The followng should work
1. select ITEMNUMBER from Table1 group by ITEMUNMBER having count(*) > 1
This gives me a list of the duplicate records in Table 1. This works fine, but I somehow need to include it to exclude these items when I
run the update.
First isolate those ITEMNUMBER's...
You create Dot-Matrix reports in Crystal like you would for any other type of printer. Just go sparingly on graphics, and keep your fonts to those embedded within the printer. You need to define the printer to your system before you create the report, that's it. Tell us more if your questions...
This should be the easiest thing to do. In a SQL Server table, I store menu information that is later shown in a tree-view control on a winform. The menu shows the names of forms that can be invoked. One of the columns contains the names of the various forms that can be executed (shown).
These...
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.