hello, in one of my projects i run a query on a database and place the result in a new table. the result is supposed to be sorted by one of two fields, my code looks like:
sSQL = "SELECT * INTO T4RR FROM T4R"
sSQL = sSQL & strRetNo & "ORDER BY T4R."
if optBuilt.value = true then
sSQL = sSQL & "ShippedWeek;"
else
sSQL = sSQL & "BuiltWeek;"
end if
when i run it for the built week, it sorts fine, but when i run it for the shipped week, the results look like someone took the correctly sorted list, cut it in half and pasted the first half after the second half. if i had a list of 8 strings it would look like this {e,f,g,h,a,b,c,d}. i would appreciate any guidance as to how to fix this problem.
thank you for your time
Justin Loehlein
sSQL = "SELECT * INTO T4RR FROM T4R"
sSQL = sSQL & strRetNo & "ORDER BY T4R."
if optBuilt.value = true then
sSQL = sSQL & "ShippedWeek;"
else
sSQL = sSQL & "BuiltWeek;"
end if
when i run it for the built week, it sorts fine, but when i run it for the shipped week, the results look like someone took the correctly sorted list, cut it in half and pasted the first half after the second half. if i had a list of 8 strings it would look like this {e,f,g,h,a,b,c,d}. i would appreciate any guidance as to how to fix this problem.
thank you for your time
Justin Loehlein